Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
A data buffer, generally used to represent a chunk of a #SoupMessageBody.
@data is a #char because that's generally convenient; in some situations you may need to cast it to #guchar or another type.
- newtype Buffer = Buffer (ForeignPtr Buffer)
- noBuffer :: Maybe Buffer
- bufferCopy :: MonadIO m => Buffer -> m Buffer
- bufferFree :: MonadIO m => Buffer -> m ()
- bufferGetAsBytes :: MonadIO m => Buffer -> m Bytes
- bufferGetData :: MonadIO m => Buffer -> m ByteString
- bufferGetOwner :: MonadIO m => Buffer -> m ()
- bufferNew :: MonadIO m => ByteString -> m Buffer
- bufferNewSubbuffer :: MonadIO m => Buffer -> Word64 -> Word64 -> m Buffer
- bufferNewWithOwner :: MonadIO m => ByteString -> Ptr () -> Maybe DestroyNotify -> m Buffer
- bufferReadData :: Buffer -> IO (Ptr ())
- bufferReadLength :: Buffer -> IO Word64
Exported types
Methods
bufferCopy
bufferCopy :: MonadIO m => Buffer -> m Buffer Source
bufferFree
bufferFree :: MonadIO m => Buffer -> m () Source
bufferGetAsBytes
bufferGetAsBytes :: MonadIO m => Buffer -> m Bytes Source
bufferGetData
bufferGetData :: MonadIO m => Buffer -> m ByteString Source
bufferGetOwner
bufferGetOwner :: MonadIO m => Buffer -> m () Source
bufferNew
bufferNew :: MonadIO m => ByteString -> m Buffer Source
bufferNewSubbuffer
bufferNewWithOwner
bufferNewWithOwner :: MonadIO m => ByteString -> Ptr () -> Maybe DestroyNotify -> m Buffer Source
Properties
Data
bufferReadData :: Buffer -> IO (Ptr ()) Source
Length
bufferReadLength :: Buffer -> IO Word64 Source