packstream-bolt-0.1.0.0: PackStream binary serialization format
Safe HaskellNone
LanguageGHC2021

Data.PackStream.Put

Description

Internal module. Not part of the public API.

Synopsis

Documentation

putNull :: Put Source #

Encode a PackStream null value.

putBoolean :: Bool -> Put Source #

Encode a PackStream boolean value.

putFloat :: Double -> Put Source #

Encode a Double as a PackStream 64-bit float.

putInteger :: Int -> Put Source #

Encodes an Int to PackStream

See also PSInteger and its Binary instance.

putInteger64 :: Int64 -> Put Source #

Encode an Int64 to PackStream.

putString :: Text -> Put Source #

Encode a Text as a PackStream UTF-8 string.

putBytes :: ByteString -> Put Source #

Encode a ByteString as a PackStream byte array.

putList :: (a -> Put) -> Vector a -> Put Source #

Encode a Vector as a PackStream list using the given element encoder.

putList' Source #

Arguments

:: Word32

number of array elements

-> Put

Put action emitting array elements (NOTE: it's the responsibility of the caller to ensure that the declared array length matches exactly the data generated by the Put action)

-> Put 

putDictionary :: (a -> Put) -> (b -> Put) -> HashMap a b -> Put Source #

Encode a HashMap as a PackStream dictionary using the given key and value encoders.