protocol-buffers-2.4.2: 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 #

This writes message as text-format protobuf to String

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

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

Internal API functions

class TextMsg a where #

Printable and readable messages

Minimal complete definition

textPut, textGet

Methods

textPut :: a -> Output #

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

class TextType a where #

Printable and readable field types

Minimal complete definition

tellT, getT

Methods

tellT :: String -> a -> Output #

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

Instances

TextType Bool # 

Methods

tellT :: String -> Bool -> Output #

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

TextType Double # 

Methods

tellT :: String -> Double -> Output #

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

TextType Float # 

Methods

tellT :: String -> Float -> Output #

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

TextType Int32 # 

Methods

tellT :: String -> Int32 -> Output #

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

TextType Int64 # 

Methods

tellT :: String -> Int64 -> Output #

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

TextType Word32 # 

Methods

tellT :: String -> Word32 -> Output #

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

TextType Word64 # 

Methods

tellT :: String -> Word64 -> Output #

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

TextType ByteString # 

Methods

tellT :: String -> ByteString -> Output #

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

TextType Utf8 # 

Methods

tellT :: String -> Utf8 -> Output #

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

TextType a => TextType (Maybe a) # 

Methods

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

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

TextType a => TextType (Seq a) # 

Methods

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

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

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

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

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