Safe Haskell | None |
---|---|
Language | Haskell98 |
This module add unknown field support to the library. There are no user API things here, except for advanced spelunking into the data structures which can and have changed with no notice. Importer beware.
Synopsis
- newtype UnknownField = UnknownField (Seq UnknownFieldValue)
- class UnknownMessage msg where
- getUnknownField :: msg -> UnknownField
- putUnknownField :: UnknownField -> msg -> msg
- data UnknownFieldValue = UFV !WireTag !ByteString
- wireSizeUnknownField :: UnknownField -> WireSize
- wirePutUnknownField :: UnknownField -> Put
- wirePutUnknownFieldWithSize :: UnknownField -> PutM WireSize
- catch'Unknown :: UnknownMessage a => (WireTag -> a -> Get a) -> WireTag -> a -> Get a
- catch'Unknown' :: (WireTag -> a -> Get a) -> (WireTag -> a -> Get a) -> WireTag -> a -> Get a
- loadUnknown :: UnknownMessage a => WireTag -> a -> Get a
- discardUnknown :: WireTag -> a -> Get a
Documentation
newtype UnknownField Source #
This is a suposedly opaque type
Instances
class UnknownMessage msg where Source #
Messages that can store unknown fields implement this interface. UnknownField is a supposedly opaque type.
getUnknownField :: msg -> UnknownField Source #
putUnknownField :: UnknownField -> msg -> msg Source #
data UnknownFieldValue Source #
Instances
wireSizeUnknownField :: UnknownField -> WireSize Source #
This is used by the generated code
wirePutUnknownField :: UnknownField -> Put Source #
This is used by the generated code
wirePutUnknownFieldWithSize :: UnknownField -> PutM WireSize Source #
This is used by the generated code
catch'Unknown :: UnknownMessage a => (WireTag -> a -> Get a) -> WireTag -> a -> Get a Source #
This is used by the generated code. Here for backwards compatibility.
catch'Unknown' :: (WireTag -> a -> Get a) -> (WireTag -> a -> Get a) -> WireTag -> a -> Get a Source #
loadUnknown :: UnknownMessage a => WireTag -> a -> Get a Source #
This is used by the generated code
discardUnknown :: WireTag -> a -> Get a Source #
This is used by the generated code