Copyright | (c) Abhinav Gupta 2015 |
---|---|
License | BSD3 |
Maintainer | Abhinav Gupta <mail@abhinavg.net> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- data Protocol = Protocol {
- serializeValue :: forall a. IsTType a => Value a -> Builder
- serializeMessage :: Message -> Builder
- deserializeValue' :: forall a. IsTType a => Get (Value a)
- deserializeMessage' :: Get Message
- deserializeValue :: forall a. IsTType a => Protocol -> ByteString -> Either String (Value a)
- deserializeMessage :: Protocol -> ByteString -> Either String Message
Documentation
Protocols define a specific way to convert values into binary and back.
Protocol | |
|
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.