pinch-0.4.1.2: An alternative implementation of Thrift for Haskell.
Copyright(c) Abhinav Gupta 2015
LicenseBSD3
MaintainerAbhinav Gupta <mail@abhinavg.net>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Pinch.Protocol

Description

Protocols in Pinch only need to know how to serialize and deserialize Value objects. Types that want to be serialized into/from Thrift payloads define how to convert them to/from Value objects via Pinchable.

Synopsis

Documentation

data Protocol Source #

Protocols define a specific way to convert values into binary and back.

Constructors

Protocol 

Fields

deserializeValue :: forall a. IsTType a => Protocol -> ByteString -> Either String (Value a) Source #

Reads a Value from a ByteString.

deserializeMessage :: Protocol -> ByteString -> Either String Message Source #

Reads a Message and its payload from a ByteString.