| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Proto3.Suite
Description
Protocol Buffers v3 for Haskell
This package defines tools for working with protocol buffers version 3 in Haskell.
Specifically, it provides:
- Low-level functions for encoding and decoding messages
- Type classes for encoding and decoding messages, and instances for all wire formats identified in the specification
- A higher-level approach to encoding and decoding, based on GHC.Generics
- A way of creating .proto files from Haskell types.
See the Proto3.Suite.Tutorial module for more details.
Synopsis
- toLazyByteString :: Message a => a -> ByteString
- fromByteString :: Message a => ByteString -> Either ParseError a
- fromB64 :: Message a => ByteString -> Either ParseError a
- class Message a where
- encodeMessage :: FieldNumber -> a -> MessageBuilder
- decodeMessage :: FieldNumber -> Parser RawMessage a
- dotProto :: Proxy# a -> [DotProtoField]
- class MessageField a where
- encodeMessageField :: FieldNumber -> a -> MessageBuilder
- decodeMessageField :: Parser RawField a
- protoType :: Proxy# a -> DotProtoField
- class Primitive a where
- encodePrimitive :: FieldNumber -> a -> MessageBuilder
- decodePrimitive :: Parser RawPrimitive a
- primType :: Proxy# a -> DotProtoPrimType
- class HasDefault a where
- newtype FieldNumber = FieldNumber {}
- fieldNumber :: Word64 -> FieldNumber
- message :: (Message a, Named a) => Proxy# a -> DotProtoDefinition
- enum :: (Finite e, Named e) => Proxy# e -> DotProtoDefinition
- data RenderingOptions = RenderingOptions {}
- class Named a where
- class ProtoEnum a => Finite a where
- newtype Fixed a = Fixed {
- fixed :: a
- newtype Signed a = Signed {
- signed :: a
- newtype Enumerated a = Enumerated {
- enumerated :: Either Int32 a
- newtype Nested a = Nested {}
- newtype UnpackedVec a = UnpackedVec {
- unpackedvec :: Vector a
- newtype PackedVec a = PackedVec {
- packedvec :: Vector a
- newtype NestedVec a = NestedVec {
- nestedvec :: Vector a
- newtype Commented (comment :: Symbol) a = Commented {
- unCommented :: a
- type (//) a (comment :: Symbol) = Commented comment a
- module Proto3.Suite.DotProto
Message Encoding/Decoding
toLazyByteString :: Message a => a -> ByteString Source #
Serialize a message as a lazy ByteString.
fromByteString :: Message a => ByteString -> Either ParseError a Source #
Parse any message that can be decoded.
fromB64 :: Message a => ByteString -> Either ParseError a Source #
As fromByteString, except the input bytestring is base64-encoded.
class Message a where Source #
This class captures those types which correspond to protocol buffer messages.
Minimal complete definition
Nothing
Methods
encodeMessage :: FieldNumber -> a -> MessageBuilder Source #
Encode a message
default encodeMessage :: (Generic a, GenericMessage (Rep a)) => FieldNumber -> a -> MessageBuilder Source #
decodeMessage :: FieldNumber -> Parser RawMessage a Source #
Decode a message
default decodeMessage :: (Generic a, GenericMessage (Rep a)) => FieldNumber -> Parser RawMessage a Source #
dotProto :: Proxy# a -> [DotProtoField] Source #
Generate a .proto message from the type information.
default dotProto :: GenericMessage (Rep a) => Proxy# a -> [DotProtoField] Source #
Instances
class MessageField a where Source #
This class captures those types which can appear as message fields in
the protocol buffers specification, i.e. Primitive types, or lists of
Primitive types
Minimal complete definition
Nothing
Methods
encodeMessageField :: FieldNumber -> a -> MessageBuilder Source #
Encode a message field
default encodeMessageField :: (HasDefault a, Primitive a) => FieldNumber -> a -> MessageBuilder Source #
decodeMessageField :: Parser RawField a Source #
Decode a message field
default decodeMessageField :: (HasDefault a, Primitive a) => Parser RawField a Source #
protoType :: Proxy# a -> DotProtoField Source #
Get the type which represents this type inside another message.
Instances
class Primitive a where Source #
This class captures those types which correspond to primitives in the protocol buffers specification.
It should be possible to fully reconstruct values of these types from
a single RawPrimitive. Notably, then, Nested is not Primitive even
though it can be embedded, since a nested message may by split up over
multiple embedded fields.
Minimal complete definition
Methods
encodePrimitive :: FieldNumber -> a -> MessageBuilder Source #
Encode a primitive value
decodePrimitive :: Parser RawPrimitive a Source #
Decode a primitive value
primType :: Proxy# a -> DotProtoPrimType Source #
Get the type which represents this type inside another message.
Instances
class HasDefault a where Source #
A class for types with default values per the protocol buffers spec.
Minimal complete definition
Nothing
Methods
The default value for this type.
Instances
newtype FieldNumber #
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 | |
Fields | |
Instances
fieldNumber :: Word64 -> FieldNumber #
Create a FieldNumber given the (one-based) integer which would label
the field in the corresponding .proto file.
Documentation
message :: (Message a, Named a) => Proxy# a -> DotProtoDefinition Source #
Generate metadata for a message type.
enum :: (Finite e, Named e) => Proxy# e -> DotProtoDefinition Source #
Generate metadata for an enum type.
data RenderingOptions Source #
Options for rendering a .proto file.
Constructors
| RenderingOptions | |
Fields
| |
This class captures those types whose names need to appear in .proto files.
It has a default implementation for any data type which is an instance of the
Generic class, which will extract the name of the type constructor.
Minimal complete definition
Nothing
class ProtoEnum a => Finite a where Source #
Enumerable types with finitely many values.
This class can be derived whenever a sum type is an instance of Generic,
and only consists of zero-argument constructors. The derived instance should
be compatible with ProtoEnum instances, in the sense that
map (fromJust . toProtoEnumMay . snd) enumerate
should enumerate all values of the type without runtime errors.
Minimal complete definition
Nothing
Wire Formats
Fixed provides a way to encode integers in the fixed-width wire formats.
Instances
| Foldable Fixed Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => Fixed m -> m # foldMap :: Monoid m => (a -> m) -> Fixed a -> m # foldMap' :: Monoid m => (a -> m) -> Fixed a -> m # foldr :: (a -> b -> b) -> b -> Fixed a -> b # foldr' :: (a -> b -> b) -> b -> Fixed a -> b # foldl :: (b -> a -> b) -> b -> Fixed a -> b # foldl' :: (b -> a -> b) -> b -> Fixed a -> b # foldr1 :: (a -> a -> a) -> Fixed a -> a # foldl1 :: (a -> a -> a) -> Fixed a -> a # elem :: Eq a => a -> Fixed a -> Bool # maximum :: Ord a => Fixed a -> a # minimum :: Ord a => Fixed a -> a # | |||||
| Traversable Fixed Source # | |||||
| Functor Fixed Source # | |||||
| MessageFieldType 'Implicit 'Fixed32 (Fixed Word32) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'Fixed64 (Fixed Word64) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'SFixed32 (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'SFixed64 (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'Fixed32 (Maybe (ForceEmit (Fixed Word32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'Fixed64 (Maybe (ForceEmit (Fixed Word64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SFixed32 (Maybe (ForceEmit (Signed (Fixed Int32)))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SFixed64 (Maybe (ForceEmit (Signed (Fixed Int64)))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| Arbitrary a => Arbitrary (Fixed a) Source # | |||||
| FromJSONKey a => FromJSONKey (Fixed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class Methods fromJSONKey :: FromJSONKeyFunction (Fixed a) # fromJSONKeyList :: FromJSONKeyFunction [Fixed a] # | |||||
| ToJSONKey a => ToJSONKey (Fixed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class | |||||
| Bounded a => Bounded (Fixed a) Source # | |||||
| Enum a => Enum (Fixed a) Source # | |||||
| Generic (Fixed a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
| |||||
| Num a => Num (Fixed a) Source # | |||||
| Show a => Show (Fixed a) Source # | |||||
| NFData a => NFData (Fixed a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Eq a => Eq (Fixed a) Source # | |||||
| Ord a => Ord (Fixed a) Source # | |||||
| HasDefault (Fixed Int32) Source # | Used in generated records to represent | ||||
| HasDefault (Fixed Int64) Source # | Used in generated records to represent | ||||
| HasDefault (Fixed Word32) Source # | |||||
| HasDefault (Fixed Word64) Source # | |||||
| HasDefault (Signed (Fixed Int32)) Source # | |||||
| HasDefault (Signed (Fixed Int64)) Source # | |||||
| MessageField (Fixed Word32) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Fixed Word32 -> MessageBuilder Source # decodeMessageField :: Parser RawField (Fixed Word32) Source # protoType :: Proxy# (Fixed Word32) -> DotProtoField Source # | |||||
| MessageField (Fixed Word64) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Fixed Word64 -> MessageBuilder Source # decodeMessageField :: Parser RawField (Fixed Word64) Source # protoType :: Proxy# (Fixed Word64) -> DotProtoField Source # | |||||
| MessageField (PackedVec (Fixed Word32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Fixed Word32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Fixed Word32)) Source # protoType :: Proxy# (PackedVec (Fixed Word32)) -> DotProtoField Source # | |||||
| MessageField (PackedVec (Fixed Word64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Fixed Word64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Fixed Word64)) Source # protoType :: Proxy# (PackedVec (Fixed Word64)) -> DotProtoField Source # | |||||
| MessageField (PackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| MessageField (PackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| MessageField (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed (Fixed Int32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed (Fixed Int32)) Source # protoType :: Proxy# (Signed (Fixed Int32)) -> DotProtoField Source # | |||||
| MessageField (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed (Fixed Int64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed (Fixed Int64)) Source # protoType :: Proxy# (Signed (Fixed Int64)) -> DotProtoField Source # | |||||
| Primitive (Fixed Word32) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Fixed Word32 -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Fixed Word32) Source # primType :: Proxy# (Fixed Word32) -> DotProtoPrimType Source # | |||||
| Primitive (Fixed Word64) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Fixed Word64 -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Fixed Word64) Source # primType :: Proxy# (Fixed Word64) -> DotProtoPrimType Source # | |||||
| Primitive (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed (Fixed Int32) -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed (Fixed Int32)) Source # primType :: Proxy# (Signed (Fixed Int32)) -> DotProtoPrimType Source # | |||||
| Primitive (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed (Fixed Int64) -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed (Fixed Int64)) Source # primType :: Proxy# (Signed (Fixed Int64)) -> DotProtoPrimType Source # | |||||
| FromJSONPB a => FromJSONPB (Fixed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class | |||||
| ToJSONPB a => ToJSONPB (Fixed a) Source # | |||||
| ToSchema a => ToSchema (Fixed a) Source # | |||||
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (Fixed a) -> Declare (Definitions Schema) NamedSchema # | |||||
| MessageFieldType ('Repeated 'Packed) 'Fixed32 (PackedVec (Fixed Word32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'Fixed64 (PackedVec (Fixed Word64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'SFixed32 (PackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'SFixed64 (PackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Fixed32 (UnpackedVec (Fixed Word32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Fixed64 (UnpackedVec (Fixed Word64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed32 (UnpackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed64 (UnpackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| type Rep (Fixed a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
Signed provides a way to encode integers in the signed wire formats.
Instances
| Foldable Signed Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => Signed m -> m # foldMap :: Monoid m => (a -> m) -> Signed a -> m # foldMap' :: Monoid m => (a -> m) -> Signed a -> m # foldr :: (a -> b -> b) -> b -> Signed a -> b # foldr' :: (a -> b -> b) -> b -> Signed a -> b # foldl :: (b -> a -> b) -> b -> Signed a -> b # foldl' :: (b -> a -> b) -> b -> Signed a -> b # foldr1 :: (a -> a -> a) -> Signed a -> a # foldl1 :: (a -> a -> a) -> Signed a -> a # elem :: Eq a => a -> Signed a -> Bool # maximum :: Ord a => Signed a -> a # minimum :: Ord a => Signed a -> a # | |||||
| Traversable Signed Source # | |||||
| Functor Signed Source # | |||||
| MessageFieldType 'Implicit 'SFixed32 (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'SFixed64 (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'SInt32 (Signed Int32) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Implicit 'SInt64 (Signed Int64) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SFixed32 (Maybe (ForceEmit (Signed (Fixed Int32)))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SFixed64 (Maybe (ForceEmit (Signed (Fixed Int64)))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SInt32 (Maybe (ForceEmit (Signed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional 'SInt64 (Maybe (ForceEmit (Signed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| Arbitrary a => Arbitrary (Signed a) Source # | |||||
| FromJSONKey a => FromJSONKey (Signed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class Methods fromJSONKey :: FromJSONKeyFunction (Signed a) # | |||||
| ToJSONKey a => ToJSONKey (Signed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class | |||||
| Bounded a => Bounded (Signed a) Source # | |||||
| Generic (Signed a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
| |||||
| Num a => Num (Signed a) Source # | |||||
| Show a => Show (Signed a) Source # | |||||
| NFData a => NFData (Signed a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Eq a => Eq (Signed a) Source # | |||||
| Ord a => Ord (Signed a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| HasDefault (Signed Int32) Source # | |||||
| HasDefault (Signed Int64) Source # | |||||
| HasDefault (Signed (Fixed Int32)) Source # | |||||
| HasDefault (Signed (Fixed Int64)) Source # | |||||
| MessageField (PackedVec (Signed Int32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Signed Int32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Signed Int32)) Source # protoType :: Proxy# (PackedVec (Signed Int32)) -> DotProtoField Source # | |||||
| MessageField (PackedVec (Signed Int64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Signed Int64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Signed Int64)) Source # protoType :: Proxy# (PackedVec (Signed Int64)) -> DotProtoField Source # | |||||
| MessageField (PackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| MessageField (PackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| MessageField (Signed Int32) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed Int32 -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed Int32) Source # protoType :: Proxy# (Signed Int32) -> DotProtoField Source # | |||||
| MessageField (Signed Int64) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed Int64 -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed Int64) Source # protoType :: Proxy# (Signed Int64) -> DotProtoField Source # | |||||
| MessageField (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed (Fixed Int32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed (Fixed Int32)) Source # protoType :: Proxy# (Signed (Fixed Int32)) -> DotProtoField Source # | |||||
| MessageField (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Signed (Fixed Int64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (Signed (Fixed Int64)) Source # protoType :: Proxy# (Signed (Fixed Int64)) -> DotProtoField Source # | |||||
| Primitive (Signed Int32) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed Int32 -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed Int32) Source # primType :: Proxy# (Signed Int32) -> DotProtoPrimType Source # | |||||
| Primitive (Signed Int64) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed Int64 -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed Int64) Source # primType :: Proxy# (Signed Int64) -> DotProtoPrimType Source # | |||||
| Primitive (Signed (Fixed Int32)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed (Fixed Int32) -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed (Fixed Int32)) Source # primType :: Proxy# (Signed (Fixed Int32)) -> DotProtoPrimType Source # | |||||
| Primitive (Signed (Fixed Int64)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Signed (Fixed Int64) -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Signed (Fixed Int64)) Source # primType :: Proxy# (Signed (Fixed Int64)) -> DotProtoPrimType Source # | |||||
| FromJSONPB a => FromJSONPB (Signed a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class | |||||
| ToJSONPB a => ToJSONPB (Signed a) Source # | |||||
| ToSchema a => ToSchema (Signed a) Source # | |||||
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (Signed a) -> Declare (Definitions Schema) NamedSchema # | |||||
| MessageFieldType ('Repeated 'Packed) 'SFixed32 (PackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'SFixed64 (PackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'SInt32 (PackedVec (Signed Int32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Packed) 'SInt64 (PackedVec (Signed Int64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed32 (UnpackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed64 (UnpackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SInt32 (UnpackedVec (Signed Int32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SInt64 (UnpackedVec (Signed Int64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| type Rep (Signed a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
newtype Enumerated a Source #
Enumerated lifts any type with an IsEnum instance so that it can be encoded
with HasEncoding.
Constructors
| Enumerated | |
Fields
| |
Instances
| Foldable Enumerated Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => Enumerated m -> m # foldMap :: Monoid m => (a -> m) -> Enumerated a -> m # foldMap' :: Monoid m => (a -> m) -> Enumerated a -> m # foldr :: (a -> b -> b) -> b -> Enumerated a -> b # foldr' :: (a -> b -> b) -> b -> Enumerated a -> b # foldl :: (b -> a -> b) -> b -> Enumerated a -> b # foldl' :: (b -> a -> b) -> b -> Enumerated a -> b # foldr1 :: (a -> a -> a) -> Enumerated a -> a # foldl1 :: (a -> a -> a) -> Enumerated a -> a # toList :: Enumerated a -> [a] # null :: Enumerated a -> Bool # length :: Enumerated a -> Int # elem :: Eq a => a -> Enumerated a -> Bool # maximum :: Ord a => Enumerated a -> a # minimum :: Ord a => Enumerated a -> a # sum :: Num a => Enumerated a -> a # product :: Num a => Enumerated a -> a # | |||||
| Traversable Enumerated Source # | |||||
Defined in Proto3.Suite.Types Methods traverse :: Applicative f => (a -> f b) -> Enumerated a -> f (Enumerated b) # sequenceA :: Applicative f => Enumerated (f a) -> f (Enumerated a) # mapM :: Monad m => (a -> m b) -> Enumerated a -> m (Enumerated b) # sequence :: Monad m => Enumerated (m a) -> m (Enumerated a) # | |||||
| Functor Enumerated Source # | |||||
Defined in Proto3.Suite.Types Methods fmap :: (a -> b) -> Enumerated a -> Enumerated b # (<$) :: a -> Enumerated b -> Enumerated a # | |||||
| (ProtoEnum e, FieldForm 'Implicit 'Int32 Int32) => FieldForm 'Implicit ('Enumeration e) (Enumerated e :: Type) Source # | |||||
Defined in Proto3.Suite.Form.Encode Methods fieldForm :: Proxy# 'Implicit -> Proxy# ('Enumeration e) -> FieldNumber -> Enumerated e -> MessageBuilder Source # | |||||
| (ProtoEnum e, FieldForm 'Optional 'Int32 (Identity Int32)) => FieldForm 'Optional ('Enumeration e) (Identity (Enumerated e) :: Type) Source # | |||||
Defined in Proto3.Suite.Form.Encode Methods fieldForm :: Proxy# 'Optional -> Proxy# ('Enumeration e) -> FieldNumber -> Identity (Enumerated e) -> MessageBuilder Source # | |||||
| MessageFieldType 'Implicit ('Enumeration e) (Enumerated e) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType 'Optional ('Enumeration e) (Maybe (ForceEmit (Enumerated e))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| ProtoEnum a => Arbitrary (Enumerated a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Generic (Enumerated a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
| |||||
| Show a => Show (Enumerated a) Source # | |||||
Defined in Proto3.Suite.Types Methods showsPrec :: Int -> Enumerated a -> ShowS # show :: Enumerated a -> String # showList :: [Enumerated a] -> ShowS # | |||||
| NFData a => NFData (Enumerated a) Source # | |||||
Defined in Proto3.Suite.Types Methods rnf :: Enumerated a -> () # | |||||
| ProtoEnum a => Eq (Enumerated a) Source # | We consider two enumerated values to be equal if they serialize to the same code. | ||||
Defined in Proto3.Suite.Types | |||||
| ProtoEnum a => Ord (Enumerated a) Source # | We compare two enumerated values by comparing the code to which they serialize. | ||||
Defined in Proto3.Suite.Types Methods compare :: Enumerated a -> Enumerated a -> Ordering # (<) :: Enumerated a -> Enumerated a -> Bool # (<=) :: Enumerated a -> Enumerated a -> Bool # (>) :: Enumerated a -> Enumerated a -> Bool # (>=) :: Enumerated a -> Enumerated a -> Bool # max :: Enumerated a -> Enumerated a -> Enumerated a # min :: Enumerated a -> Enumerated a -> Enumerated a # | |||||
| ProtoEnum e => HasDefault (Enumerated e) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| (Named e, ProtoEnum e) => MessageField (Enumerated e) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Enumerated e -> MessageBuilder Source # decodeMessageField :: Parser RawField (Enumerated e) Source # protoType :: Proxy# (Enumerated e) -> DotProtoField Source # | |||||
| (Named e, ProtoEnum e) => MessageField (PackedVec (Enumerated e)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Enumerated e) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Enumerated e)) Source # protoType :: Proxy# (PackedVec (Enumerated e)) -> DotProtoField Source # | |||||
| (Named e, ProtoEnum e) => Primitive (Enumerated e) Source # | |||||
Defined in Proto3.Suite.Class Methods encodePrimitive :: FieldNumber -> Enumerated e -> MessageBuilder Source # decodePrimitive :: Parser RawPrimitive (Enumerated e) Source # primType :: Proxy# (Enumerated e) -> DotProtoPrimType Source # | |||||
| (ProtoEnum e, FromJSONPB e) => FromJSONPB (Enumerated e) Source # | Supports both names and integer codes, as required by: https://developers.google.com/protocol-buffers/docs/proto3#json | ||||
Defined in Proto3.Suite.JSONPB.Class Methods parseJSONPB :: Value -> Parser (Enumerated e) Source # | |||||
| ToJSONPB e => ToJSONPB (Enumerated e) Source # | If you ask for an unrecognized enumerator code to be emitted, then this instance will emit it numerically, relying upon parser behavior required by: https://developers.google.com/protocol-buffers/docs/proto3#json | ||||
Defined in Proto3.Suite.JSONPB.Class Methods toJSONPB :: Enumerated e -> Options -> Value Source # toEncodingPB :: Enumerated e -> Options -> Encoding Source # | |||||
| (Finite e, Named e) => ToSchema (Enumerated e) Source # | JSONPB schemas for protobuf enumerations | ||||
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (Enumerated e) -> Declare (Definitions Schema) NamedSchema # | |||||
| MessageFieldType ('Repeated 'Packed) ('Enumeration e) (PackedVec (Enumerated e)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) ('Enumeration e) (UnpackedVec (Enumerated e)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| type Rep (Enumerated a) Source # | |||||
Defined in Proto3.Suite.Types type Rep (Enumerated a) = D1 ('MetaData "Enumerated" "Proto3.Suite.Types" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "Enumerated" 'PrefixI 'True) (S1 ('MetaSel ('Just "enumerated") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Either Int32 a)))) | |||||
Nested provides a way to nest protobuf messages within protobuf messages.
Instances
| Foldable Nested Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => Nested m -> m # foldMap :: Monoid m => (a -> m) -> Nested a -> m # foldMap' :: Monoid m => (a -> m) -> Nested a -> m # foldr :: (a -> b -> b) -> b -> Nested a -> b # foldr' :: (a -> b -> b) -> b -> Nested a -> b # foldl :: (b -> a -> b) -> b -> Nested a -> b # foldl' :: (b -> a -> b) -> b -> Nested a -> b # foldr1 :: (a -> a -> a) -> Nested a -> a # foldl1 :: (a -> a -> a) -> Nested a -> a # elem :: Eq a => a -> Nested a -> Bool # maximum :: Ord a => Nested a -> a # minimum :: Ord a => Nested a -> a # | |||||
| Traversable Nested Source # | |||||
| Alternative Nested Source # | |||||
| Applicative Nested Source # | |||||
| Functor Nested Source # | |||||
| Monad Nested Source # | |||||
| Arbitrary a => Arbitrary (Nested a) Source # | |||||
| Semigroup a => Monoid (Nested a) Source # | |||||
| Semigroup a => Semigroup (Nested a) Source # | |||||
| Generic (Nested a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
| |||||
| Show a => Show (Nested a) Source # | |||||
| NFData a => NFData (Nested a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Eq a => Eq (Nested a) Source # | |||||
| Ord a => Ord (Nested a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| HasDefault (Nested a) Source # | |||||
| (Named a, Message a) => MessageField (Nested a) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Nested a -> MessageBuilder Source # | |||||
| FromJSONPB a => FromJSONPB (Nested a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class | |||||
| ToJSONPB a => ToJSONPB (Nested a) Source # | |||||
| ToSchema (Maybe a) => ToSchema (Nested a) Source # | |||||
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (Nested a) -> Declare (Definitions Schema) NamedSchema # | |||||
| (Ord k, Primitive k, Named v, Message v, MessageField k) => MessageField (Map k (Nested v)) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> Map k (Nested v) -> MessageBuilder Source # decodeMessageField :: Parser RawField (Map k (Nested v)) Source # protoType :: Proxy# (Map k (Nested v)) -> DotProtoField Source # | |||||
| type Rep (Nested a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
newtype UnpackedVec a Source #
Constructors
| UnpackedVec | |
Fields
| |
Instances
| Foldable UnpackedVec Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => UnpackedVec m -> m # foldMap :: Monoid m => (a -> m) -> UnpackedVec a -> m # foldMap' :: Monoid m => (a -> m) -> UnpackedVec a -> m # foldr :: (a -> b -> b) -> b -> UnpackedVec a -> b # foldr' :: (a -> b -> b) -> b -> UnpackedVec a -> b # foldl :: (b -> a -> b) -> b -> UnpackedVec a -> b # foldl' :: (b -> a -> b) -> b -> UnpackedVec a -> b # foldr1 :: (a -> a -> a) -> UnpackedVec a -> a # foldl1 :: (a -> a -> a) -> UnpackedVec a -> a # toList :: UnpackedVec a -> [a] # null :: UnpackedVec a -> Bool # length :: UnpackedVec a -> Int # elem :: Eq a => a -> UnpackedVec a -> Bool # maximum :: Ord a => UnpackedVec a -> a # minimum :: Ord a => UnpackedVec a -> a # sum :: Num a => UnpackedVec a -> a # product :: Num a => UnpackedVec a -> a # | |||||
| Traversable UnpackedVec Source # | |||||
Defined in Proto3.Suite.Types Methods traverse :: Applicative f => (a -> f b) -> UnpackedVec a -> f (UnpackedVec b) # sequenceA :: Applicative f => UnpackedVec (f a) -> f (UnpackedVec a) # mapM :: Monad m => (a -> m b) -> UnpackedVec a -> m (UnpackedVec b) # sequence :: Monad m => UnpackedVec (m a) -> m (UnpackedVec a) # | |||||
| Alternative UnpackedVec Source # | |||||
Defined in Proto3.Suite.Types Methods empty :: UnpackedVec a # (<|>) :: UnpackedVec a -> UnpackedVec a -> UnpackedVec a # some :: UnpackedVec a -> UnpackedVec [a] # many :: UnpackedVec a -> UnpackedVec [a] # | |||||
| Applicative UnpackedVec Source # | |||||
Defined in Proto3.Suite.Types Methods pure :: a -> UnpackedVec a # (<*>) :: UnpackedVec (a -> b) -> UnpackedVec a -> UnpackedVec b # liftA2 :: (a -> b -> c) -> UnpackedVec a -> UnpackedVec b -> UnpackedVec c # (*>) :: UnpackedVec a -> UnpackedVec b -> UnpackedVec b # (<*) :: UnpackedVec a -> UnpackedVec b -> UnpackedVec a # | |||||
| Functor UnpackedVec Source # | |||||
Defined in Proto3.Suite.Types Methods fmap :: (a -> b) -> UnpackedVec a -> UnpackedVec b # (<$) :: a -> UnpackedVec b -> UnpackedVec a # | |||||
| Arbitrary a => Arbitrary (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Monoid (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods mempty :: UnpackedVec a # mappend :: UnpackedVec a -> UnpackedVec a -> UnpackedVec a # mconcat :: [UnpackedVec a] -> UnpackedVec a # | |||||
| Semigroup (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods (<>) :: UnpackedVec a -> UnpackedVec a -> UnpackedVec a # sconcat :: NonEmpty (UnpackedVec a) -> UnpackedVec a # stimes :: Integral b => b -> UnpackedVec a -> UnpackedVec a # | |||||
| IsList (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
Methods fromList :: [Item (UnpackedVec a)] -> UnpackedVec a # fromListN :: Int -> [Item (UnpackedVec a)] -> UnpackedVec a # toList :: UnpackedVec a -> [Item (UnpackedVec a)] # | |||||
| Show a => Show (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods showsPrec :: Int -> UnpackedVec a -> ShowS # show :: UnpackedVec a -> String # showList :: [UnpackedVec a] -> ShowS # | |||||
| NFData a => NFData (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods rnf :: UnpackedVec a -> () # | |||||
| Eq a => Eq (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods (==) :: UnpackedVec a -> UnpackedVec a -> Bool # (/=) :: UnpackedVec a -> UnpackedVec a -> Bool # | |||||
| Ord a => Ord (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types Methods compare :: UnpackedVec a -> UnpackedVec a -> Ordering # (<) :: UnpackedVec a -> UnpackedVec a -> Bool # (<=) :: UnpackedVec a -> UnpackedVec a -> Bool # (>) :: UnpackedVec a -> UnpackedVec a -> Bool # (>=) :: UnpackedVec a -> UnpackedVec a -> Bool # max :: UnpackedVec a -> UnpackedVec a -> UnpackedVec a # min :: UnpackedVec a -> UnpackedVec a -> UnpackedVec a # | |||||
| HasDefault (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Class | |||||
| Primitive a => MessageField (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> UnpackedVec a -> MessageBuilder Source # decodeMessageField :: Parser RawField (UnpackedVec a) Source # protoType :: Proxy# (UnpackedVec a) -> DotProtoField Source # | |||||
| FromJSONPB a => FromJSONPB (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class Methods parseJSONPB :: Value -> Parser (UnpackedVec a) Source # | |||||
| ToJSONPB a => ToJSONPB (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.JSONPB.Class Methods toJSONPB :: UnpackedVec a -> Options -> Value Source # toEncodingPB :: UnpackedVec a -> Options -> Encoding Source # | |||||
| ToSchema a => ToSchema (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (UnpackedVec a) -> Declare (Definitions Schema) NamedSchema # | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Bool (UnpackedVec Bool) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Bytes (UnpackedVec (Bytes a)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Double (UnpackedVec Double) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Fixed32 (UnpackedVec (Fixed Word32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Fixed64 (UnpackedVec (Fixed Word64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Float (UnpackedVec Float) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Int32 (UnpackedVec Int32) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'Int64 (UnpackedVec Int64) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed32 (UnpackedVec (Signed (Fixed Int32))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SFixed64 (UnpackedVec (Signed (Fixed Int64))) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SInt32 (UnpackedVec (Signed Int32)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'SInt64 (UnpackedVec (Signed Int64)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'String (UnpackedVec (String a)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'UInt32 (UnpackedVec Word32) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) 'UInt64 (UnpackedVec Word64) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| MessageFieldType ('Repeated 'Unpacked) ('Enumeration e) (UnpackedVec (Enumerated e)) Source # | |||||
Defined in Proto3.Suite.Form | |||||
| type Item (UnpackedVec a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
PackedVec provides a way to encode packed lists of basic protobuf types into
the wire format.
Instances
| Foldable PackedVec Source # | |
Defined in Proto3.Suite.Types Methods fold :: Monoid m => PackedVec m -> m # foldMap :: Monoid m => (a -> m) -> PackedVec a -> m # foldMap' :: Monoid m => (a -> m) -> PackedVec a -> m # foldr :: (a -> b -> b) -> b -> PackedVec a -> b # foldr' :: (a -> b -> b) -> b -> PackedVec a -> b # foldl :: (b -> a -> b) -> b -> PackedVec a -> b # foldl' :: (b -> a -> b) -> b -> PackedVec a -> b # foldr1 :: (a -> a -> a) -> PackedVec a -> a # foldl1 :: (a -> a -> a) -> PackedVec a -> a # toList :: PackedVec a -> [a] # length :: PackedVec a -> Int # elem :: Eq a => a -> PackedVec a -> Bool # maximum :: Ord a => PackedVec a -> a # minimum :: Ord a => PackedVec a -> a # | |
| Traversable PackedVec Source # | |
Defined in Proto3.Suite.Types | |
| Alternative PackedVec Source # | |
| Applicative PackedVec Source # | |
| Functor PackedVec Source # | |
| Arbitrary a => Arbitrary (PackedVec a) Source # | |
| Monoid (PackedVec a) Source # | |
| Semigroup (PackedVec a) Source # | |
| IsList (PackedVec a) Source # | |
| Show a => Show (PackedVec a) Source # | |
| NFData a => NFData (PackedVec a) Source # | |
Defined in Proto3.Suite.Types | |
| Eq a => Eq (PackedVec a) Source # | |
| Ord a => Ord (PackedVec a) Source # | |
Defined in Proto3.Suite.Types | |
| HasDefault (PackedVec a) Source # | |
| MessageField (PackedVec Int32) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Int32 -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Int32) Source # protoType :: Proxy# (PackedVec Int32) -> DotProtoField Source # | |
| MessageField (PackedVec Int64) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Int64 -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Int64) Source # protoType :: Proxy# (PackedVec Int64) -> DotProtoField Source # | |
| MessageField (PackedVec Word32) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Word32 -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Word32) Source # protoType :: Proxy# (PackedVec Word32) -> DotProtoField Source # | |
| MessageField (PackedVec Word64) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Word64 -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Word64) Source # protoType :: Proxy# (PackedVec Word64) -> DotProtoField Source # | |
| (Named e, ProtoEnum e) => MessageField (PackedVec (Enumerated e)) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Enumerated e) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Enumerated e)) Source # protoType :: Proxy# (PackedVec (Enumerated e)) -> DotProtoField Source # | |
| MessageField (PackedVec (Fixed Word32)) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Fixed Word32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Fixed Word32)) Source # protoType :: Proxy# (PackedVec (Fixed Word32)) -> DotProtoField Source # | |
| MessageField (PackedVec (Fixed Word64)) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Fixed Word64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Fixed Word64)) Source # protoType :: Proxy# (PackedVec (Fixed Word64)) -> DotProtoField Source # | |
| MessageField (PackedVec (Signed Int32)) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Signed Int32) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Signed Int32)) Source # protoType :: Proxy# (PackedVec (Signed Int32)) -> DotProtoField Source # | |
| MessageField (PackedVec (Signed Int64)) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec (Signed Int64) -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec (Signed Int64)) Source # protoType :: Proxy# (PackedVec (Signed Int64)) -> DotProtoField Source # | |
| MessageField (PackedVec (Signed (Fixed Int32))) Source # | |
Defined in Proto3.Suite.Class | |
| MessageField (PackedVec (Signed (Fixed Int64))) Source # | |
Defined in Proto3.Suite.Class | |
| MessageField (PackedVec Bool) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Bool -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Bool) Source # protoType :: Proxy# (PackedVec Bool) -> DotProtoField Source # | |
| MessageField (PackedVec Double) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Double -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Double) Source # protoType :: Proxy# (PackedVec Double) -> DotProtoField Source # | |
| MessageField (PackedVec Float) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> PackedVec Float -> MessageBuilder Source # decodeMessageField :: Parser RawField (PackedVec Float) Source # protoType :: Proxy# (PackedVec Float) -> DotProtoField Source # | |
| FromJSONPB a => FromJSONPB (PackedVec a) Source # | |
Defined in Proto3.Suite.JSONPB.Class | |
| ToJSONPB a => ToJSONPB (PackedVec a) Source # | |
| ToSchema a => ToSchema (PackedVec a) Source # | |
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (PackedVec a) -> Declare (Definitions Schema) NamedSchema # | |
| MessageFieldType ('Repeated 'Packed) 'Bool (PackedVec Bool) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Double (PackedVec Double) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Fixed32 (PackedVec (Fixed Word32)) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Fixed64 (PackedVec (Fixed Word64)) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Float (PackedVec Float) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Int32 (PackedVec Int32) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'Int64 (PackedVec Int64) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'SFixed32 (PackedVec (Signed (Fixed Int32))) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'SFixed64 (PackedVec (Signed (Fixed Int64))) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'SInt32 (PackedVec (Signed Int32)) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'SInt64 (PackedVec (Signed Int64)) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'UInt32 (PackedVec Word32) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) 'UInt64 (PackedVec Word64) Source # | |
Defined in Proto3.Suite.Form | |
| MessageFieldType ('Repeated 'Packed) ('Enumeration e) (PackedVec (Enumerated e)) Source # | |
Defined in Proto3.Suite.Form | |
| type Item (PackedVec a) Source # | |
Defined in Proto3.Suite.Types | |
Instances
| Foldable NestedVec Source # | |
Defined in Proto3.Suite.Types Methods fold :: Monoid m => NestedVec m -> m # foldMap :: Monoid m => (a -> m) -> NestedVec a -> m # foldMap' :: Monoid m => (a -> m) -> NestedVec a -> m # foldr :: (a -> b -> b) -> b -> NestedVec a -> b # foldr' :: (a -> b -> b) -> b -> NestedVec a -> b # foldl :: (b -> a -> b) -> b -> NestedVec a -> b # foldl' :: (b -> a -> b) -> b -> NestedVec a -> b # foldr1 :: (a -> a -> a) -> NestedVec a -> a # foldl1 :: (a -> a -> a) -> NestedVec a -> a # toList :: NestedVec a -> [a] # length :: NestedVec a -> Int # elem :: Eq a => a -> NestedVec a -> Bool # maximum :: Ord a => NestedVec a -> a # minimum :: Ord a => NestedVec a -> a # | |
| Traversable NestedVec Source # | |
Defined in Proto3.Suite.Types | |
| Alternative NestedVec Source # | |
| Applicative NestedVec Source # | |
| Functor NestedVec Source # | |
| Arbitrary a => Arbitrary (NestedVec a) Source # | |
| Monoid (NestedVec a) Source # | |
| Semigroup (NestedVec a) Source # | |
| IsList (NestedVec a) Source # | |
| Show a => Show (NestedVec a) Source # | |
| NFData a => NFData (NestedVec a) Source # | |
Defined in Proto3.Suite.Types | |
| Eq a => Eq (NestedVec a) Source # | |
| Ord a => Ord (NestedVec a) Source # | |
Defined in Proto3.Suite.Types | |
| HasDefault (NestedVec a) Source # | |
| (Named a, Message a) => MessageField (NestedVec a) Source # | |
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> NestedVec a -> MessageBuilder Source # decodeMessageField :: Parser RawField (NestedVec a) Source # | |
| FromJSONPB a => FromJSONPB (NestedVec a) Source # | |
Defined in Proto3.Suite.JSONPB.Class | |
| ToJSONPB a => ToJSONPB (NestedVec a) Source # | |
| ToSchema a => ToSchema (NestedVec a) Source # | |
Defined in Proto3.Suite.DotProto.Generate.Swagger Methods declareNamedSchema :: Proxy (NestedVec a) -> Declare (Definitions Schema) NamedSchema # | |
| type Item (NestedVec a) Source # | |
Defined in Proto3.Suite.Types | |
newtype Commented (comment :: Symbol) a Source #
Commented provides a way to add comments to generated .proto files.
Constructors
| Commented | |
Fields
| |
Instances
| Foldable (Commented comment) Source # | |||||
Defined in Proto3.Suite.Types Methods fold :: Monoid m => Commented comment m -> m # foldMap :: Monoid m => (a -> m) -> Commented comment a -> m # foldMap' :: Monoid m => (a -> m) -> Commented comment a -> m # foldr :: (a -> b -> b) -> b -> Commented comment a -> b # foldr' :: (a -> b -> b) -> b -> Commented comment a -> b # foldl :: (b -> a -> b) -> b -> Commented comment a -> b # foldl' :: (b -> a -> b) -> b -> Commented comment a -> b # foldr1 :: (a -> a -> a) -> Commented comment a -> a # foldl1 :: (a -> a -> a) -> Commented comment a -> a # toList :: Commented comment a -> [a] # null :: Commented comment a -> Bool # length :: Commented comment a -> Int # elem :: Eq a => a -> Commented comment a -> Bool # maximum :: Ord a => Commented comment a -> a # minimum :: Ord a => Commented comment a -> a # | |||||
| Traversable (Commented comment) Source # | |||||
Defined in Proto3.Suite.Types Methods traverse :: Applicative f => (a -> f b) -> Commented comment a -> f (Commented comment b) # sequenceA :: Applicative f => Commented comment (f a) -> f (Commented comment a) # mapM :: Monad m => (a -> m b) -> Commented comment a -> m (Commented comment b) # sequence :: Monad m => Commented comment (m a) -> m (Commented comment a) # | |||||
| Functor (Commented comment) Source # | |||||
| Arbitrary a => Arbitrary (Commented comment a) Source # | |||||
| Monoid a => Monoid (Commented comment a) Source # | |||||
| Semigroup a => Semigroup (Commented comment a) Source # | |||||
| Generic (Commented comment a) Source # | |||||
Defined in Proto3.Suite.Types Associated Types
| |||||
| Show a => Show (Commented comment a) Source # | |||||
| NFData a => NFData (Commented comment a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
| Eq a => Eq (Commented comment a) Source # | |||||
| Ord a => Ord (Commented comment a) Source # | |||||
Defined in Proto3.Suite.Types Methods compare :: Commented comment a -> Commented comment a -> Ordering # (<) :: Commented comment a -> Commented comment a -> Bool # (<=) :: Commented comment a -> Commented comment a -> Bool # (>) :: Commented comment a -> Commented comment a -> Bool # (>=) :: Commented comment a -> Commented comment a -> Bool # max :: Commented comment a -> Commented comment a -> Commented comment a # min :: Commented comment a -> Commented comment a -> Commented comment a # | |||||
| (MessageField e, KnownSymbol comments) => MessageField (e // comments) Source # | |||||
Defined in Proto3.Suite.Class Methods encodeMessageField :: FieldNumber -> (e // comments) -> MessageBuilder Source # decodeMessageField :: Parser RawField (e // comments) Source # protoType :: Proxy# (e // comments) -> DotProtoField Source # | |||||
| type Rep (Commented comment a) Source # | |||||
Defined in Proto3.Suite.Types | |||||
type (//) a (comment :: Symbol) = Commented comment a Source #
A type operator synonym for Commented, so that we can write C-style
comments on fields.
AST
module Proto3.Suite.DotProto