protocol-buffers-2.0.17: Parse Google Protocol Buffer specifications

Safe HaskellNone
LanguageHaskell98

Text.ProtocolBuffers.TextMessage

Contents

Synopsis

User API functions

Main encoding and decoding operations

messagePutText :: TextMsg a => a -> String Source

This writes message as text-format protobuf to String

messageGetText :: (TextMsg a, Stream s Identity Char) => s -> Either String a Source

This reads message as text-format protobuf from any Parsec-compatible source. Input must be completely consumed.

Internal API functions

class TextMsg a where Source

Printable and readable messages

Methods

textPut :: a -> Output Source

textGet :: Stream s Identity Char => Parsec s () a Source

class TextType a where Source

Printable and readable field types

Methods

tellT :: String -> a -> Output Source

getT :: Stream s Identity Char => String -> Parsec s () a Source

tellShow :: Show a => String -> a -> Output Source

tellSubMessage :: TextMsg a => String -> a -> Output Source

getRead :: forall a s. (Read a, Stream s Identity Char) => String -> Parsec s () a Source