protocol-buffers-2.4.13: 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 Lexeme

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 #

Instances
TextType Bool Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Bool -> Output Source #

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

TextType Double Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Double -> Output Source #

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

TextType Float Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Float -> Output Source #

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

TextType Int32 Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Int32 -> Output Source #

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

TextType Int64 Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Int64 -> Output Source #

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

TextType Word32 Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Word32 -> Output Source #

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

TextType Word64 Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Word64 -> Output Source #

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

TextType ByteString Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

TextType Utf8 Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Utf8 -> Output Source #

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

TextType a => TextType (Maybe a) Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Maybe a -> Output Source #

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

TextType a => TextType (Seq a) Source # 
Instance details

Defined in Text.ProtocolBuffers.TextMessage

Methods

tellT :: String -> Seq a -> Output Source #

getT :: Stream s Identity Char => String -> Parsec s () (Seq 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 #