| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Network.Protocol.Codec.Utils
Synopsis
- data WithBytes a = WithBytes {
- cborBytes :: ByteString
- cborPayload :: a
- encodeBytes :: ByteString -> Encoding
- encodeWithBytes :: WithBytes a -> Encoding
- newtype WithByteSpan a = WithByteSpan (a, ByteOffset, ByteOffset)
- decodeWithByteSpan :: Decoder s a -> Decoder s (WithByteSpan a)
- bytesBetweenOffsets :: ByteOffset -> ByteOffset -> ByteString -> ByteString
- runWithByteSpan :: ByteString -> WithByteSpan (ByteString -> a) -> WithBytes a
Documentation
Constructors
| WithBytes | |
Fields
| |
encodeBytes :: ByteString -> Encoding Source #
encodeWithBytes :: WithBytes a -> Encoding Source #
newtype WithByteSpan a Source #
A bytespan functor.
Constructors
| WithByteSpan (a, ByteOffset, ByteOffset) |
decodeWithByteSpan :: Decoder s a -> Decoder s (WithByteSpan a) Source #
bytesBetweenOffsets :: ByteOffset -> ByteOffset -> ByteString -> ByteString Source #
runWithByteSpan :: ByteString -> WithByteSpan (ByteString -> a) -> WithBytes a Source #