Safe Haskell | None |
---|---|
Language | Haskell2010 |
Functions for converting protocol buffers to a human-readable text format.
Synopsis
- showMessage :: Message msg => msg -> String
- showMessageWithRegistry :: Message msg => Registry -> msg -> String
- showMessageShort :: Message msg => msg -> String
- pprintMessage :: Message msg => msg -> Doc
- pprintMessageWithRegistry :: Message msg => Registry -> msg -> Doc
- readMessage :: Message msg => Text -> Either String msg
- readMessageWithRegistry :: Message msg => Registry -> Text -> Either String msg
- readMessageOrDie :: Message msg => Text -> msg
Documentation
showMessage :: Message msg => msg -> String Source #
Convert the given message into a human-readable String
.
showMessageShort :: Message msg => msg -> String Source #
Serializes a proto as a string on a single line. Useful for debugging
and error messages like .DebugString()
in other languages.
pprintMessage :: Message msg => msg -> Doc Source #
Pretty-print the given message into a human-readable form.
pprintMessageWithRegistry :: Message msg => Registry -> msg -> Doc Source #
Pretty-print the given message into human-readable form, using the given
Registry
to decode google.protobuf.Any
values.
readMessage :: Message msg => Text -> Either String msg Source #
Parse a Message
from the human-readable protocol buffer text format.