- data Endianness
- data MarshalError
- data UnmarshalError
- marshalMessage :: Message a => Endianness -> Serial -> a -> Either MarshalError ByteString
- unmarshalMessage :: ByteString -> Either UnmarshalError ReceivedMessage
Documentation
marshalMessage :: Message a => Endianness -> Serial -> a -> Either MarshalError ByteStringSource
Convert a Message
into a ByteString
. Although unusual, it is
possible for marshaling to fail; if this occurs, an error will be
returned instead.
unmarshalMessage :: ByteString -> Either UnmarshalError ReceivedMessageSource
Parse a ByteString
into a ReceivedMessage
. The result can be
inspected to see what type of message was parsed. Unknown message types
can still be parsed successfully, as long as they otherwise conform to
the D‐Bus standard.