Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class BondProto t where
- class BondProto t => BondTaggedProto t where
Documentation
class BondProto t where Source #
Typeclass for Bond serialization protocols.
bondRead :: BondStruct a => t -> ByteString -> Either String a Source #
Deserialize structure from stream.
bondWrite :: BondStruct a => t -> a -> Either String ByteString Source #
Serialize structure to stream.
bondReadWithSchema :: t -> StructSchema -> ByteString -> Either String Struct Source #
Deserialize structure from stream using provided schema.
bondWriteWithSchema :: t -> StructSchema -> Struct -> Either String ByteString Source #
Serialize structure to stream using provided schema.
bondMarshal :: BondStruct a => t -> a -> Either String ByteString Source #
Serialize structure to stream and add protocol header. See bondUnmarshal
for deserialization.
bondMarshalWithSchema :: t -> StructSchema -> Struct -> Either String ByteString Source #
Serialize structure to stream using provided schema and add protocol header. See bondUnmarshalWithSchema
for deserialization.
protoSig :: t -> ByteString Source #
Get protocol header.
class BondProto t => BondTaggedProto t where Source #
Typeclass for tagged Bond serialization protocols. Such protocols support schemaless operations.
bondReadTagged :: t -> ByteString -> Either String Struct Source #
Deserialize structure from stream without schema.
bondWriteTagged :: t -> Struct -> Either String ByteString Source #
Serialize structure to stream without schema.
bondMarshalTagged :: t -> Struct -> Either String ByteString Source #
Serialize structure to stream without schema and add protocol header. See bondUnmarshalTagged
for deserialization.