protobuf-simple-0.1.0.2: Simple Protocol Buffers library (proto2)

Copyright(c) 2015-2016 Martijn Rijkeboer <mrr@sru-systems.com>
LicenseMIT
MaintainerMartijn Rijkeboer <mrr@sru-systems.com>
Safe HaskellNone
LanguageHaskell2010

Data.ProtoBuf

Description

Functions for encoding and decoding Protocol Buffers data.

Synopsis

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