| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.ProtoLens.Encoding.Wire
Description
Module defining the individual base wire types (e.g. VarInt, Fixed64).
They are used to represent the unknownFields within the proto message.
Upstream docs: https://developers.google.com/protocol-buffers/docs/encoding#structure
Synopsis
- newtype Tag = Tag {}
- data TaggedValue = TaggedValue !Tag !WireValue
- data WireValue
- = VarInt !Word64
- | Fixed64 !Word64
- | Lengthy !ByteString
- | StartGroup
- | EndGroup
- | Fixed32 !Word32
- type FieldSet = [TaggedValue]
- splitTypeAndTag :: Word64 -> (Tag, Word8)
- joinTypeAndTag :: Tag -> Word8 -> Word64
- parseFieldSet :: Parser FieldSet
- buildFieldSet :: FieldSet -> Builder
- buildMessageSet :: FieldSet -> Builder
- parseTaggedValueFromWire :: Word64 -> Parser TaggedValue
- parseMessageSetTaggedValueFromWire :: Word64 -> Parser TaggedValue
Documentation
A tag that identifies a particular field of the message when converting to/from the wire format.
data TaggedValue Source #
A pair of an encoded field and a value.
Constructors
| TaggedValue !Tag !WireValue |
Instances
| Eq TaggedValue Source # | |
Defined in Data.ProtoLens.Encoding.Wire | |
| Ord TaggedValue Source # | |
Defined in Data.ProtoLens.Encoding.Wire Methods compare :: TaggedValue -> TaggedValue -> Ordering # (<) :: TaggedValue -> TaggedValue -> Bool # (<=) :: TaggedValue -> TaggedValue -> Bool # (>) :: TaggedValue -> TaggedValue -> Bool # (>=) :: TaggedValue -> TaggedValue -> Bool # max :: TaggedValue -> TaggedValue -> TaggedValue # min :: TaggedValue -> TaggedValue -> TaggedValue # | |
| NFData TaggedValue Source # | |
Defined in Data.ProtoLens.Encoding.Wire Methods rnf :: TaggedValue -> () # | |
The encoding of some unknown field on the wire.
Constructors
| VarInt !Word64 | |
| Fixed64 !Word64 | |
| Lengthy !ByteString | |
| StartGroup | |
| EndGroup | |
| Fixed32 !Word32 |
Instances
| Eq WireValue Source # | |
| Ord WireValue Source # | |
| NFData WireValue Source # | |
Defined in Data.ProtoLens.Encoding.Wire | |
type FieldSet = [TaggedValue] Source #
buildFieldSet :: FieldSet -> Builder Source #
buildMessageSet :: FieldSet -> Builder Source #