Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. dataInputStreamReadUntilFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, CSize)

    gi-gio GI.Gio.Objects.DataInputStream

    Deprecated: (Since version 2.56)Use dataInputStreamReadUptoFinish instead, whichhas more consistent behaviour regarding the stop character.

  2. dataInputStreamReadUpto :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Maybe b -> m (Text, CSize)

    gi-gio GI.Gio.Objects.DataInputStream

    Reads a string from the data input stream, up to the first occurrence of any of the stop characters. In contrast to dataInputStreamReadUntil, this function does not consume the stop character. You have to use dataInputStreamReadByte to get it before calling dataInputStreamReadUpto again. Note that stopChars may contain '\0' if stopCharsLen is specified. The returned string will always be nul-terminated on success. Since: 2.26

  3. dataInputStreamReadUptoAsync :: (HasCallStack, MonadIO m, IsDataInputStream a, IsCancellable b) => a -> Text -> Int64 -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()

    gi-gio GI.Gio.Objects.DataInputStream

    The asynchronous version of dataInputStreamReadUpto. It is an error to have two outstanding calls to this function. In contrast to dataInputStreamReadUntil, this function does not consume the stop character. You have to use dataInputStreamReadByte to get it before calling dataInputStreamReadUpto again. Note that stopChars may contain '\0' if stopCharsLen is specified. When the operation is finished, callback will be called. You can then call dataInputStreamReadUptoFinish to get the result of the operation. Since: 2.26

  4. dataInputStreamReadUptoFinish :: (HasCallStack, MonadIO m, IsDataInputStream a, IsAsyncResult b) => a -> b -> m (Text, CSize)

    gi-gio GI.Gio.Objects.DataInputStream

    Finish an asynchronous call started by dataInputStreamReadUptoAsync. Note that this function does not consume the stop character. You have to use dataInputStreamReadByte to get it before calling dataInputStreamReadUptoAsync again. The returned string will always be nul-terminated on success. Since: 2.24

  5. inputStreamRead :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (Int64, ByteString)

    gi-gio GI.Gio.Objects.InputStream

    Tries to read count bytes from the stream into the buffer starting at buffer. Will block during this read. If count is zero returns zero and does nothing. A value of count larger than G_MAXSSIZE will cause a IOErrorEnumInvalidArgument error. On success, the number of bytes read into the buffer is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if count is zero), but never otherwise. The returned buffer is not a nul-terminated string, it can contain nul bytes at any position, and this function doesn't nul-terminate the buffer. If cancellable is not Nothing, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error IOErrorEnumCancelled will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error -1 is returned and error is set accordingly.

  6. inputStreamReadAll :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Maybe b -> m (ByteString, CSize)

    gi-gio GI.Gio.Objects.InputStream

    Tries to read count bytes from the stream into the buffer starting at buffer. Will block during this read. This function is similar to inputStreamRead, except it tries to read as many bytes as requested, only stopping on an error or end of stream. On a successful read of count bytes, or if we reached the end of the stream, True is returned, and bytesRead is set to the number of bytes read into buffer. If there is an error during the operation False is returned and error is set to indicate the error status. As a special exception to the normal conventions for functions that use GError, if this function returns False (and sets error) then bytesRead will be set to the number of bytes that were successfully read before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around inputStreamRead.

  7. inputStreamReadAllAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m ByteString

    gi-gio GI.Gio.Objects.InputStream

    Request an asynchronous read of count bytes from the stream into the buffer starting at buffer. This is the asynchronous equivalent of inputStreamReadAll. Call inputStreamReadAllFinish to collect the result. Any outstanding I/O request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT. Since: 2.44

  8. inputStreamReadAllFinish :: (HasCallStack, MonadIO m, IsInputStream a, IsAsyncResult b) => a -> b -> m CSize

    gi-gio GI.Gio.Objects.InputStream

    Finishes an asynchronous stream read operation started with inputStreamReadAllAsync. As a special exception to the normal conventions for functions that use GError, if this function returns False (and sets error) then bytesRead will be set to the number of bytes that were successfully read before the error was encountered. This functionality is only available from C. If you need it from another language then you must write your own loop around inputStreamReadAsync. Since: 2.44

  9. inputStreamReadAsync :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> Maybe ByteString -> Int32 -> Maybe b -> Maybe AsyncReadyCallback -> m (Maybe ByteString)

    gi-gio GI.Gio.Objects.InputStream

    Request an asynchronous read of count bytes from the stream into the buffer starting at buffer. When the operation is finished callback will be called. You can then call inputStreamReadFinish to get the result of the operation. During an async request no other sync and async calls are allowed on stream, and will result in IOErrorEnumPending errors. A value of count larger than G_MAXSSIZE will cause a IOErrorEnumInvalidArgument error. On success, the number of bytes read into the buffer will be passed to the callback. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file, but generally we try to read as many bytes as requested. Zero is returned on end of file (or if count is zero), but never otherwise. Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT. The asynchronous methods have a default fallback that uses threads to implement asynchronicity, so they are optional for inheriting classes. However, if you override one you must override all.

  10. inputStreamReadBytes :: (HasCallStack, MonadIO m, IsInputStream a, IsCancellable b) => a -> CSize -> Maybe b -> m Bytes

    gi-gio GI.Gio.Objects.InputStream

    Like inputStreamRead, this tries to read count bytes from the stream in a blocking fashion. However, rather than reading into a user-supplied buffer, this will create a new Bytes containing the data that was read. This may be easier to use from language bindings. If count is zero, returns a zero-length Bytes and does nothing. A value of count larger than G_MAXSSIZE will cause a IOErrorEnumInvalidArgument error. On success, a new Bytes is returned. It is not an error if the size of this object is not the same as the requested size, as it can happen e.g. near the end of a file. A zero-length Bytes is returned on end of file (or if count is zero), but never otherwise. If cancellable is not Nothing, then the operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, the error IOErrorEnumCancelled will be returned. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. On error Nothing is returned and error is set accordingly. Since: 2.34

Page 510 of many | Previous | Next