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)
- newZeroBuffer :: MonadIO m => m Buffer
- noBuffer :: Maybe Buffer
- data BufferCopyMethodInfo
- bufferCopy :: MonadIO m => Buffer -> m Buffer
- data BufferFreeMethodInfo
- bufferFree :: MonadIO m => Buffer -> m ()
- data BufferGetAsBytesMethodInfo
- bufferGetAsBytes :: MonadIO m => Buffer -> m Bytes
- data BufferGetDataMethodInfo
- bufferGetData :: MonadIO m => Buffer -> m ByteString
- data BufferGetOwnerMethodInfo
- bufferGetOwner :: MonadIO m => Buffer -> m (Ptr ())
- bufferNew :: MonadIO m => ByteString -> m Buffer
- data BufferNewSubbufferMethodInfo
- bufferNewSubbuffer :: MonadIO m => Buffer -> Word64 -> Word64 -> m Buffer
- bufferNewWithOwner :: MonadIO m => ByteString -> Ptr () -> Maybe DestroyNotify -> m Buffer
- bufferClearData :: MonadIO m => Buffer -> m ()
- bufferData :: AttrLabelProxy "data"
- bufferReadData :: MonadIO m => Buffer -> m (Ptr ())
- bufferWriteData :: MonadIO m => Buffer -> Ptr () -> m ()
- bufferLength :: AttrLabelProxy "length"
- bufferReadLength :: MonadIO m => Buffer -> m Word64
- bufferWriteLength :: MonadIO m => Buffer -> Word64 -> m ()
Exported types
BoxedObject Buffer | |
(~) AttrOpTag tag AttrSet => Constructible Buffer tag | |
((~) * signature (Word64 -> Word64 -> m Buffer), MonadIO m) => MethodInfo * BufferNewSubbufferMethodInfo Buffer signature | |
((~) * signature (m (Ptr ())), MonadIO m) => MethodInfo * BufferGetOwnerMethodInfo Buffer signature | |
((~) * signature (m ByteString), MonadIO m) => MethodInfo * BufferGetDataMethodInfo Buffer signature | |
((~) * signature (m Bytes), MonadIO m) => MethodInfo * BufferGetAsBytesMethodInfo Buffer signature | |
((~) * signature (m ()), MonadIO m) => MethodInfo * BufferFreeMethodInfo Buffer signature | |
((~) * signature (m Buffer), MonadIO m) => MethodInfo * BufferCopyMethodInfo Buffer signature | |
((~) * info (ResolveBufferMethod t Buffer), MethodInfo * info Buffer p) => IsLabelProxy t (Buffer -> p) | |
type AttributeList Buffer |
newZeroBuffer :: MonadIO m => m Buffer Source
Construct a Buffer
struct initialized to zero.
Methods
bufferCopy
data BufferCopyMethodInfo Source
((~) * signature (m Buffer), MonadIO m) => MethodInfo * BufferCopyMethodInfo Buffer signature |
bufferCopy :: MonadIO m => Buffer -> m Buffer Source
bufferFree
data BufferFreeMethodInfo Source
((~) * signature (m ()), MonadIO m) => MethodInfo * BufferFreeMethodInfo Buffer signature |
bufferFree :: MonadIO m => Buffer -> m () Source
bufferGetAsBytes
data BufferGetAsBytesMethodInfo Source
((~) * signature (m Bytes), MonadIO m) => MethodInfo * BufferGetAsBytesMethodInfo Buffer signature |
bufferGetAsBytes :: MonadIO m => Buffer -> m Bytes Source
bufferGetData
data BufferGetDataMethodInfo Source
((~) * signature (m ByteString), MonadIO m) => MethodInfo * BufferGetDataMethodInfo Buffer signature |
bufferGetData :: MonadIO m => Buffer -> m ByteString Source
bufferGetOwner
data BufferGetOwnerMethodInfo Source
((~) * signature (m (Ptr ())), MonadIO m) => MethodInfo * BufferGetOwnerMethodInfo Buffer signature |
bufferGetOwner :: MonadIO m => Buffer -> m (Ptr ()) Source
bufferNew
bufferNew :: MonadIO m => ByteString -> m Buffer Source
bufferNewSubbuffer
data BufferNewSubbufferMethodInfo Source
((~) * signature (Word64 -> Word64 -> m Buffer), MonadIO m) => MethodInfo * BufferNewSubbufferMethodInfo Buffer signature |
bufferNewWithOwner
bufferNewWithOwner :: MonadIO m => ByteString -> Ptr () -> Maybe DestroyNotify -> m Buffer Source
Properties
Data
bufferClearData :: MonadIO m => Buffer -> m () Source
bufferData :: AttrLabelProxy "data" Source
bufferReadData :: MonadIO m => Buffer -> m (Ptr ()) Source
bufferWriteData :: MonadIO m => Buffer -> Ptr () -> m () Source
Length
bufferLength :: AttrLabelProxy "length" Source
bufferReadLength :: MonadIO m => Buffer -> m Word64 Source
bufferWriteLength :: MonadIO m => Buffer -> Word64 -> m () Source