| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Database.Bolty.Util
Description
Internal module. Not part of the public API.
Synopsis
- chunksOfBSL :: Partial => Int64 -> ByteString -> [ByteString]
- chunksOfBS :: Partial => Int -> ByteString -> [ByteString]
- putTextUtf8 :: Text -> Put ()
- decodeStrict :: HasEndianness a => ByteString -> a
- encodeStrict :: HasEndianness a => a -> ByteString
- lazyByteStringToHex :: ByteString -> ByteString
- whenInvalid :: a -> Bool -> Text -> Validation [Text] a
Documentation
chunksOfBSL :: Partial => Int64 -> ByteString -> [ByteString] Source #
Split a lazy ByteString into chunks of at most n bytes.
chunksOfBS :: Partial => Int -> ByteString -> [ByteString] Source #
Split a strict ByteString into chunks of at most n bytes.
decodeStrict :: HasEndianness a => ByteString -> a Source #
Decode a big-endian value from a strict ByteString, throwing on failure.
encodeStrict :: HasEndianness a => a -> ByteString Source #
Encode a value as a big-endian strict ByteString.
lazyByteStringToHex :: ByteString -> ByteString Source #
Convert a lazy ByteString to an uppercase hex-encoded strict ByteString.
whenInvalid :: a -> Bool -> Text -> Validation [Text] a Source #