Copyright | (c) 2015-2016 Martijn Rijkeboer <mrr@sru-systems.com> |
---|---|
License | MIT |
Maintainer | Martijn Rijkeboer <mrr@sru-systems.com> |
Safe Haskell | None |
Language | Haskell2010 |
Functions for encoding and decoding Protocol Buffers data.
- decode :: (Default a, Required a, WireMessage a) => ByteString -> Either String a
- encode :: WireMessage a => a -> ByteString
Documentation
decode :: (Default a, Required a, WireMessage a) => ByteString -> Either String a Source #
Decode a ByteString into either the data-type or an error message.
Decode CustomType:
decCustomType :: ByteString -> Either String CustomType decCustomType = decode
encode :: WireMessage a => a -> ByteString Source #
Encode a data-type into a ByteString.
Encode CustomType:
encCustomType :: CustomType -> ByteString encCustomType = encode