Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module defines types which are shared by the encoding and decoding modules.
Synopsis
- newtype FieldNumber = FieldNumber {}
- fieldNumber :: Word64 -> FieldNumber
- data WireType
Message Structure
newtype FieldNumber Source #
A FieldNumber
identifies a field inside a protobufs message.
This library makes no attempt to generate these automatically, or even make sure that field numbers are provided in increasing order. Such things are left to other, higher-level libraries.
Instances
fieldNumber :: Word64 -> FieldNumber Source #
Create a FieldNumber
given the (one-based) integer which would label
the field in the corresponding .proto file.
The (non-deprecated) wire types identified by the Protocol Buffers specification.
Instances
Data WireType Source # | |
Defined in Proto3.Wire.Types gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WireType -> c WireType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WireType # toConstr :: WireType -> Constr # dataTypeOf :: WireType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WireType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WireType) # gmapT :: (forall b. Data b => b -> b) -> WireType -> WireType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WireType -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WireType -> r # gmapQ :: (forall d. Data d => d -> u) -> WireType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WireType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WireType -> m WireType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WireType -> m WireType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WireType -> m WireType # | |
Bounded WireType Source # | |
Enum WireType Source # | |
Generic WireType Source # | |
Show WireType Source # | |
Eq WireType Source # | |
Ord WireType Source # | |
Defined in Proto3.Wire.Types | |
Lift WireType Source # | |
type Rep WireType Source # | |
Defined in Proto3.Wire.Types type Rep WireType = D1 ('MetaData "WireType" "Proto3.Wire.Types" "proto3-wire-1.4.3-6eonz09nHTf3O9la3OJo0t" 'False) ((C1 ('MetaCons "Varint" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Fixed32" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Fixed64" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LengthDelimited" 'PrefixI 'False) (U1 :: Type -> Type))) |