Safe Haskell | None |
---|---|
Language | Haskell2010 |
Defines an buffer type.
Synopsis
- data Buffer s = Buffer {}
- bufferNew :: ST s (STRef s (Buffer s))
- bufferCapacity :: STRef s (Buffer s) -> ST s (Int, Int)
- bufferSize :: STRef s (Buffer s) -> ST s Int
- bufferReset :: STRef s (Buffer s) -> ST s ()
- bufferAppend :: Word8 -> STRef s (Buffer s) -> ST s ()
- bufferApply :: (Word8 -> ST s ()) -> STRef s (Buffer s) -> ST s ()
- bufferTake :: Int -> STRef s (Buffer s) -> ST s [Word8]
- bufferContains :: [Word8] -> STRef s (Buffer s) -> ST s Bool
- bufferPack :: STRef s (Buffer s) -> ST s BS
- bufferString :: MVector s Word8 -> Int -> ST s BS
Documentation
A type of buffer used to hold bytes.
bufferApply :: (Word8 -> ST s ()) -> STRef s (Buffer s) -> ST s () Source #
Applies an action to each word in the buffer.
bufferTake :: Int -> STRef s (Buffer s) -> ST s [Word8] Source #
Takes elements from the front of the buffer.