proto3-wire-1.4.3: A low-level implementation of the Protocol Buffers (version 3) wire format
Safe HaskellSafe-Inferred
LanguageHaskell2010

Proto3.Wire.Types

Description

This module defines types which are shared by the encoding and decoding modules.

Synopsis

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.

Constructors

FieldNumber 

Instances

Instances details
Arbitrary FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Data FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldNumber -> c FieldNumber #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldNumber #

toConstr :: FieldNumber -> Constr #

dataTypeOf :: FieldNumber -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldNumber) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldNumber) #

gmapT :: (forall b. Data b => b -> b) -> FieldNumber -> FieldNumber #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldNumber -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldNumber -> r #

gmapQ :: (forall d. Data d => d -> u) -> FieldNumber -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldNumber -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldNumber -> m FieldNumber #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldNumber -> m FieldNumber #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldNumber -> m FieldNumber #

Bounded FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Enum FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Generic FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Associated Types

type Rep FieldNumber :: Type -> Type #

Num FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Show FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

NFData FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Methods

rnf :: FieldNumber -> () #

Eq FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Ord FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Hashable FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Lift FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

Methods

lift :: Quote m => FieldNumber -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => FieldNumber -> Code m FieldNumber #

type Rep FieldNumber Source # 
Instance details

Defined in Proto3.Wire.Types

type Rep FieldNumber = D1 ('MetaData "FieldNumber" "Proto3.Wire.Types" "proto3-wire-1.4.3-6eonz09nHTf3O9la3OJo0t" 'True) (C1 ('MetaCons "FieldNumber" 'PrefixI 'True) (S1 ('MetaSel ('Just "getFieldNumber") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

fieldNumber :: Word64 -> FieldNumber Source #

Create a FieldNumber given the (one-based) integer which would label the field in the corresponding .proto file.

data WireType Source #

The (non-deprecated) wire types identified by the Protocol Buffers specification.

Instances

Instances details
Data WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Methods

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 # 
Instance details

Defined in Proto3.Wire.Types

Enum WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Generic WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Associated Types

type Rep WireType :: Type -> Type #

Methods

from :: WireType -> Rep WireType x #

to :: Rep WireType x -> WireType #

Show WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Eq WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Ord WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Lift WireType Source # 
Instance details

Defined in Proto3.Wire.Types

Methods

lift :: Quote m => WireType -> m Exp #

liftTyped :: forall (m :: Type -> Type). Quote m => WireType -> Code m WireType #

type Rep WireType Source # 
Instance details

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)))