Z-MessagePack-0.4.1.0: MessagePack
Copyright(c) Hideyuki Tanaka 2009-2015
(c) Dong Han 2020
LicenseBSD3
Safe HaskellNone
LanguageHaskell2010

Z.Data.MessagePack.Builder

Description

Builders to encode Haskell data types in MessagePack format.

Synopsis

Documentation

value :: Value -> Builder () Source #

nil :: Builder () Source #

bool :: Bool -> Builder () Source #

int :: Int64 -> Builder () Source #

float :: Float -> Builder () Source #

double :: Double -> Builder () Source #

scientificValue :: Integer -> Int64 -> Value Source #

Construct a scientific value, see scientific.

scientific :: Integer -> Int64 -> Builder () Source #

Write a scientific value in ext 0x00(positive) and 0x01(negative) format, e.g.

0xD50x000x000x00
0xC7XXXXXXXX0x00base10 exponent(MessagePack int format)coefficient(big endian 256-base limbs

timestampValue :: Int64 -> Int32 -> Value Source #

Construct a timestamp(seconds, nanoseconds) value.

timestamp :: Int64 -> Int32 -> Builder () Source #

Write a timestamp(seconds, nanoseconds) in ext 0xFF format, e.g.

str' :: String -> Builder () Source #

str :: Text -> Builder () Source #

bin :: Bytes -> Builder () Source #

array :: Vec v a => (a -> Builder ()) -> v a -> Builder () Source #

array' :: (a -> Builder ()) -> [a] -> Builder () Source #

arrayHeader :: Int -> Builder () Source #

map :: (a -> Builder ()) -> (b -> Builder ()) -> Vector (a, b) -> Builder () Source #

map' :: (a -> Builder ()) -> (b -> Builder ()) -> [(a, b)] -> Builder () Source #

mapHeader :: Int -> Builder () Source #

ext :: Word8 -> Bytes -> Builder () Source #