proto3-suite-0.9.4: A higher-level API to the proto3-wire library
Safe HaskellNone
LanguageHaskell2010

Proto3.Suite.Form.Encode

Description

Encodes to protobuf directly from application-specific source data without an intermediate value of a type generated from protobuf message definitions.

Use compile-proto-file --typeLevelFormat ... to generate supporting code.

Importantly, code generation does not make use of this module, instead using only Proto3.Suite.Form. Therefore one can replace this module with another that makes use of the same generated code.

WARNING: This module is experimental and breaking changes may occur much more frequently than in the other modules of this package, perhaps even in patch releases.

Example .proto file:

syntax = "proto3";
package Example;

message Submessage {
};

message Message {
  sint32 implicitField = 1;
  optional sint32 optionalField = 2;
  repeated sint32 repeatedField = 3;
  Submessage submessageField = 4;
  map<sint32, string> mapField = 5;
}

Example Haskell program:

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeApplications #-}

import Control.Category ((.), id)
import Data.ByteString.Lazy (writeFile)
import Data.Text.Short (ShortText)
import Data.Word (Word8)
import Example (Message, Submessage)
import Prelude hiding ((.), id)
import Proto3.Suite.Form (Association, ProtoType(SInt32, String))
import Proto3.Suite.Form.Encode
         (Auto(..), MessageEncoder, associations, field,
          fieldsToMessage, messageEncoderToLazyByteString)
import Proto3.Wire.Encode.Repeated (mapRepeated)

main :: IO ()
main = do
  let assoc :: (Word8, ShortText) -> MessageEncoder (Association 'SInt32 'String)
      assoc (k, v) = fieldsToMessage (field @"key" k . field @"value" v)
  Data.ByteString.Lazy.writeFile "example.data" $
    messageEncoderToLazyByteString $
      fieldsToMessage @Message $
        field @"implicitField" @Word8 123 .
        field @"optionalField" (Just (Auto 456)) .
        field @"repeatedField" (mapRepeated Auto [789, 321]) .
        field @"submessageField" (Just (fieldsToMessage @Submessage id)) .
        associations @"mapField" (mapRepeated assoc [(3, "abc"), (5, "xyz")])
Synopsis

Documentation

newtype MessageEncoder message Source #

Annotates MessageBuilder with the type of protobuf message it encodes. Prefix a tag and length to turn the message into a submessage of a larger message.

Instances

Instances details
FieldForm 'Optional ('Message inner) (Identity (MessageEncoder inner) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

FieldForm 'Optional ('Map key value) (Identity (MessageEncoder (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode.Core

(Message message, FromJSONPB message) => FromJSON (MessageEncoder message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, ToJSONPB message) => ToJSON (MessageEncoder message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, Show message) => Show (MessageEncoder message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Methods

showsPrec :: Int -> MessageEncoder message -> ShowS #

show :: MessageEncoder message -> String #

showList :: [MessageEncoder message] -> ShowS #

(Message message, FromJSONPB message) => FromJSONPB (MessageEncoder message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, ToJSONPB message) => ToJSONPB (MessageEncoder message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

messageEncoderToLazyByteString :: MessageEncoder message -> ByteString Source #

Serialize a message (or portion thereof) as a lazy ByteString.

messageEncoderToByteString :: MessageEncoder message -> ByteString Source #

Serialize a message (or portion thereof) as a strict ByteString.

Functionally equivalent to toStrict . messageEncoderToLazyByteString, and currently even the performance is the same.

data MessageEncoding message Source #

The octet sequence that would be emitted by some MessageEncoder having the same type parameter.

(This type is not a Semigroup because combining encodings that both have the same non-repeated field is arguably incorrect, even though the standard asks parsers to to try to work around such improper repetition.)

See also: cacheMessageEncoding

Instances

Instances details
FieldForm 'Optional ('Message inner) (Identity (MessageEncoding inner) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Map key value) (Identity (MessageEncoding (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, FromJSONPB message) => FromJSON (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, ToJSONPB message) => ToJSON (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Generic (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Associated Types

type Rep (MessageEncoding message) 
Instance details

Defined in Proto3.Suite.Form.Encode

type Rep (MessageEncoding message) = D1 ('MetaData "MessageEncoding" "Proto3.Suite.Form.Encode" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "UnsafeMessageEncoding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

Methods

from :: MessageEncoding message -> Rep (MessageEncoding message) x #

to :: Rep (MessageEncoding message) x -> MessageEncoding message #

(Message message, Show message) => Show (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Methods

showsPrec :: Int -> MessageEncoding message -> ShowS #

show :: MessageEncoding message -> String #

showList :: [MessageEncoding message] -> ShowS #

NFData (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Methods

rnf :: MessageEncoding message -> () #

(Message message, FromJSONPB message) => FromJSONPB (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(Message message, ToJSONPB message) => ToJSONPB (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

type Rep (MessageEncoding message) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

type Rep (MessageEncoding message) = D1 ('MetaData "MessageEncoding" "Proto3.Suite.Form.Encode" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "UnsafeMessageEncoding" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString)))

messageCache :: Message message => message -> MessageEncoding message Source #

Creates a message encoding by means of type class Message.

Equivalent to cacheMessageEncoding . messageReflection.

cacheMessageEncoding :: MessageEncoder message -> MessageEncoding message Source #

Precomputes the octet sequence that would be written by the given MessageEncoder. Do this only if you expect to reuse that specific octet sequence repeatedly.

cachedMessageEncoding . cacheMessageEncoding is functionally equivalent to id but has different performance characteristics.

See also: cacheFieldsEncoding.

cachedMessageEncoding :: MessageEncoding message -> MessageEncoder message Source #

Encodes a precomputed MessageEncoder by copying octets from a memory buffer. See cacheMessageEncoding.

See also: cachedFieldsEncoding

messageEncodingToByteString :: MessageEncoding message -> ByteString Source #

Strips type information from the message encoding, leaving only its octets.

unsafeByteStringToMessageEncoding :: ByteString -> MessageEncoding message Source #

Unsafe because the caller must ensure that the given octets are in the correct format for a message of the specified type.

newtype FieldsEncoder message (possible :: [Symbol]) (following :: [Symbol]) Source #

A Category on builders that prefix zero or more fields to a message. Use . to accumulate prefixes to create an MessageEncoder for a whole message.

The first type parameter specifies the type of message being built.

The second and third type parameters list the names of some subset of the oneofs and non-repeatable non-oneof fields possible within the type of message specified by the first type parameter. The third type parameter must be a suffix of the second, and limits the oneofs and non-repeatable non-oneof fields that may occur in any builder which follows the contained builder. The first parameter prefixes the names of the oneofs and non-repeatable non-oneof fields that might be written by the contained builder.

If a name ends up listed more than once, that will eventually be detected as a compilation error; see type family Distinct.

Note that this type system permits multiple blocks of the same packed repeated field. Though that would be less compact than a single block, it is allowed by the protobuf standard.

See also: cacheFieldsEncoder

Instances

Instances details
Category (FieldsEncoder message :: [Symbol] -> [Symbol] -> Type) Source #

The Category on encoders of zero or more fields of a particular type of message whose . is <> on the contained builders.

Note that . preserves the requirements on the type parameters of FieldsEncoder.

Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

id :: forall (a :: [Symbol]). FieldsEncoder message a a #

(.) :: forall (b :: [Symbol]) (c :: [Symbol]) (a :: [Symbol]). FieldsEncoder message b c -> FieldsEncoder message a b -> FieldsEncoder message a c #

etaFieldsEncoder :: forall a message (possible :: [Symbol]) (following :: [Symbol]). (a -> FieldsEncoder message possible following) -> a -> FieldsEncoder message possible following Source #

data FieldsEncoding message (possible :: [Symbol]) (following :: [Symbol]) Source #

The octet sequence that would be prefixed by some FieldsEncoder having the same type parameters.

cacheFieldsEncoding :: forall message (possible :: [Symbol]) (following :: [Symbol]). FieldsEncoder message possible following -> FieldsEncoding message possible following Source #

Precomputes the octet sequence that would be written by the given FieldsEncoder. Do this only if you expect to reuse that specific octet sequence repeatedly.

cachedFieldsEncoding . cacheFieldsEncoding is functionally equivalent to id but has different performance characteristics.

See also: cacheMessageEncoding

cachedFieldsEncoding :: forall message (possible :: [Symbol]) (following :: [Symbol]). FieldsEncoding message possible following -> FieldsEncoder message possible following Source #

Encodes a precomputed FieldsEncoder by copying octets from a memory buffer. See cacheFieldsEncoding.

See also: cachedMessageEncoding.

type Distinct message (names :: [Symbol]) = DistinctCheck message (RepeatedNames (OccupiedOnly message names)) Source #

Yields a satisfied constraint if the given list of names contains no duplicates after first filtering out the names of repeated fields and replacing the names of oneof fields with their oneof names. Otherwise raises a compilation error mentioning the repeated names.

type family DistinctCheck message (repeated :: [k]) where ... Source #

Reports nonempty output of RepeatedNames as applied to the result of OccupiedOnly.

This type family is an implementation detail of Distinct that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

DistinctCheck _1 ('[] :: [k]) = () 
DistinctCheck message (repeated :: [k]) = TypeError (('ShowType message ':<>: 'Text " forbids repetition of:") ':$$: 'ShowType repeated) :: Constraint 

type family RepeatedNames (names :: [k]) :: [k] where ... Source #

Given a list of names, returns the non-repeating list of names that occur more than once in the given list.

This type family is an implementation detail of Distinct that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

RepeatedNames (name ': names :: [k]) = RepeatedNames1 name names (Omits name names) 
RepeatedNames ('[] :: [k]) = '[] :: [k] 

type family RepeatedNames1 (name :: k) (names :: [k]) (omits :: Bool) :: [k] where ... Source #

Helps to implement RepeatedNames.

This type family is an implementation detail of Distinct that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

RepeatedNames1 (_1 :: k) (names :: [k]) 'True = RepeatedNames names 
RepeatedNames1 (name :: k) (names :: [k]) 'False = name ': RepeatedNames (Strip name names) 

type family Omits (name :: k) (names :: [k]) :: Bool where ... Source #

Is the given name absent from the given list of names?

This type family is an implementation detail of RepeatedNames that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

Omits (name :: a) (name ': names :: [a]) = 'False 
Omits (name :: k) (_1 ': names :: [k]) = Omits name names 
Omits (name :: k) ('[] :: [k]) = 'True 

type family Strip (name :: k) (names :: [k]) :: [k] where ... Source #

Strips all occurrences of the given name, leaving behind all other name occurrences.

This type family is an implementation detail of RepeatedNames that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

Strip (name :: k) (name ': names :: [k]) = Strip name names 
Strip (name :: k) (other ': names :: [k]) = other ': Strip name names 
Strip (name :: k) ('[] :: [k]) = '[] :: [k] 

type family OccupiedOnly message (names :: [Symbol]) :: [Symbol] where ... Source #

Filters out the repeated field names and replaces oneof fields with their oneof names.

We do this in case omitted is used to introduce the names of repeated fields or fields that are contained within oneofs; see the explanatory comments there.

This type family is an implementation detail of Distinct that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

OccupiedOnly message (name ': names) = OccupiedOnly1 message name names (CardinalityOf message name) 
OccupiedOnly _1 ('[] :: [Symbol]) = '[] :: [Symbol] 

type family OccupiedOnly1 message (name :: Symbol) (names :: [Symbol]) (cardinality :: Cardinality) :: [Symbol] where ... Source #

Helps to implement OccupiedOnly.

This type family is an implementation detail of Distinct that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

OccupiedOnly1 message name names 'Implicit = name ': OccupiedOnly message names 
OccupiedOnly1 message name names 'Optional = OccupiedName message name ': OccupiedOnly message names 
OccupiedOnly1 message name names ('Repeated _1) = OccupiedOnly message names 

fieldsToMessage :: forall message (names :: [Symbol]). Distinct message names => FieldsEncoder message ('[] :: [Symbol]) names -> MessageEncoder message Source #

Relabels a prefix of fields of a message as an encoding for the message as a whole (though without any tag or length that would make it a submessage).

type Occupy message (name :: Symbol) (names :: [Symbol]) = Occupy1 message name names (CardinalityOf message name) Source #

Among the names of the given message, prefixes the given name with the following exceptions:

  • Names of repeatable fields are not prefixed; there is no need to avoid their repetition.
  • When a field of a oneof is named, the name of the entire oneof is prefixed in order to prevent further emission of any of its fields.

type family Occupy1 message (name :: Symbol) (names :: [Symbol]) (cardinality :: Cardinality) :: [Symbol] where ... Source #

Helps to implement Occupy.

This type family is an implementation detail of Occupy that is subject to change, and is exported only to assist in understanding of compilation errors.

Equations

Occupy1 message name names 'Implicit = name ': names 
Occupy1 message name names 'Optional = OccupiedName message name ': names 
Occupy1 message name names ('Repeated _1) = names 

type family NameSublist (names :: [Symbol]) (moreNames :: [Symbol]) where ... Source #

The constraint that moreNames is names, but possibly with additional names inserted. For simplicity, reordering is not currently allowed.

Equations

NameSublist ('[] :: [Symbol]) _1 = () 
NameSublist (n ': ns) (n ': ms) = NameSublist ns ms 
NameSublist ns (_1 ': ms) = NameSublist ns ms 
NameSublist (n ': _1) ('[] :: [Symbol]) = TypeError ('Text "NameSublist: name disappeared: " ':<>: 'ShowType n) :: Constraint 

omitted :: forall message (names :: [Symbol]) (moreNames :: [Symbol]). NameSublist names moreNames => FieldsEncoder message names moreNames Source #

Uses an empty encoding for the oneofs and non-oneof message fields that appear in the final type parameter of FieldsEncoder but not the previous type parameter, thereby implicitly emitting their default values.

This function is not always required, but becomes necessary when there are two code paths, one of which may write non-repeatable fields and one of which leaves some implicitly defaulted. This function reconciles the types of the two code paths.

This function should not be used to introduce the name of a field that is repeated or belongs to oneof, because doing so could confuse the reader. But such misuse is unlikely to be accidental, and the Distinct constraint compensates by ignoring repeated fields and replacing oneof fields with their oneof names.

class SFieldNumberI (fieldNumber :: Nat) Source #

Provides the term-level value of the given field number type.

Minimal complete definition

sFieldNumber

Instances

Instances details
KnownNat fieldNumber => SFieldNumberI fieldNumber Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

sFieldNumber :: SFieldNumber fieldNumber

type KnownFieldNumber message (name :: Symbol) = SFieldNumberI (NumberOf message name) Source #

Provides the (term-level) field number of the field having the specified message type and field name.

class Field (name :: Symbol) (a :: TYPE r) message where Source #

Provides a way to encode a field with the given name from a given type. That name is interpreted in the context of a given type of message.

More than one argument type may be supported for any given field; see further discussion in the comments for FieldForm, to which this type class delegates after determining the cardinality and protobuf type of the field in question.

Methods

field :: forall (names :: [Symbol]). a -> FieldsEncoder message names (Occupy message name names) Source #

Encodes the named field from the given value.

If the field is neither optional, nor repeated, nor part of a oneof, then its default value is represented implicitly--that is, it encodes to zero octets.

In other cases the argument is often a container. In particular, when using this method with optional fields and fields within a oneof, the argument type typically involves Maybe or (if the field is always "set") Identity.

Use TypeApplications to specify the field name as the first type parameter.

The second type parameter may also be ambiguous. For example, the argument expression may be an integer literal or (when using OverloadedStrings) a string literal. TypeApplications would resolve the ambiguity, but you may prefer the Auto wrapper or special-case helper functions such as: message, associations.

See also fieldForm.

Instances

Instances details
(KnownFieldNumber message name, FieldForm (CardinalityOf message name) (ProtoTypeOf message name) a) => Field name (a :: TYPE r) message Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

field :: forall (names :: [Symbol]). a -> FieldsEncoder message names (Occupy message name names) Source #

class FieldForm (cardinality :: Cardinality) (protoType :: ProtoType) (a :: TYPE r) where Source #

Implements Field for all fields having the specified cardinality, protobuf type, and type of argument to be encoded within that field.

Argument Type:

For any given cardinality and protobuf type there may be multiple instances of this class for different types of argument. For example, a field of protobuf type sint64 may be encoded from any of the Haskell types Int8, Word8, Int16, Word16, Int32, Word32, or Int64. Note that this library does not provide an instance for Word64 because its values greater than or equal to 2 ^ 63 cannot be represented by sint64.

As another example, for fields of submessage type m there are type class instances for both MessageEncoder m and MessageEncoding m (wrapped in a suitable container if repeated or outside of a oneof).

Arguments for optional fields are often expressed using Maybe, and arguments for repeated fields are often expressed in using Forward, Reverse, and Reverse--the choice is up to the user.

Of course, if you add instances of this type class then please be sure to consider how they might overlap with existing instances, and try to avoid overly broad instances that might cause ambiguity.

However, this library does provide some general instances:

Design Note:

Importantly, the type parameters of this type class do not mention the containing message type, field name, or field number, thus allowing it to be broadly applicable to all containing message types.

Furthermore, type class Field has a general-purpose definition that need not be specialized for particular message types: one that makes use of KnownFieldNumber, ProtoTypeOf, and this type class (though in order to simplify usage, Field is a full type class, not a mere constraint alias with a related function).

In this way the only message-specific instances are of type classes defined in Proto3.Suite.Form, which declare message format without specifying any policy regarding how to efficiently encode or which Haskell types may be encoded.

Methods

fieldForm :: Proxy# cardinality -> Proxy# protoType -> FieldNumber -> a -> MessageBuilder Source #

Encodes a message field with the given number from the given value.

If the field is neither repeated, nor optional, nor part of a oneof, then its default value is represented implicitly--that is, it encodes to zero octets.

If you apply this method to a polymorphic expression, such as a literal value, then you may need to choose a particular type with TypeApplications or ::.

Instances

Instances details
FieldForm 'Implicit 'Bool Bool Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Bytes ByteString Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Bytes ByteString Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Bytes ShortByteString Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Bytes BuildR Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Double Double Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Double Float Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed32 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed32 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed32 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed64 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed64 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed64 Word64 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Fixed64 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Float Float Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int32 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int32 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int32 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int32 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int32 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Int64 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'Int64 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed32 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed32 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed32 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed32 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed32 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Int64 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SFixed64 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt32 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt32 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt32 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt32 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt32 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Int16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Int64 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Int8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'SInt64 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'String Text Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'String Text Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'String ShortText Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt32 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt32 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt32 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt64 Word16 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt64 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt64 Word64 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit 'UInt64 Word8 Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Bool => FieldForm 'Implicit 'Bool (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Implicit 'Bytes (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Implicit 'Double (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Implicit 'Fixed32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Implicit 'Fixed64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Implicit 'Float (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'Int32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'Int64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'SFixed32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'SFixed64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'SInt32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'SInt64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Implicit 'String (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Implicit 'UInt32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Implicit 'UInt64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Bool => FieldForm 'Optional 'Bool (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Bool (Identity Bool) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Bytes (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Bytes (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Bytes (Identity ShortByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Optional 'Bytes (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Bytes (Identity BuildR) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Optional 'Double (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Double (Identity Double) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Double (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed32 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed32 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed32 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional 'Fixed32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed64 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed64 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed64 (Identity Word64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Fixed64 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional 'Fixed64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Optional 'Float (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Float (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int32 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int32 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int32 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int32 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int32 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'Int32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Int64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'Int64 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'Int64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed32 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed32 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed32 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed32 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed32 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'SFixed32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Int64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SFixed64 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'SFixed64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt32 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt32 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt32 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt32 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt32 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'SInt32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Int64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'SInt64 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'SInt64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Optional 'String (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'String (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'String (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'String (Identity ShortText) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt32 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt32 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt32 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional 'UInt32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt64 (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt64 (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt64 (Identity Word64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional 'UInt64 (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional 'UInt64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional protoType (Identity a) => FieldForm 'Optional protoType (Maybe a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

(MessageFieldType cardinality protoType a, MessageField a) => FieldForm cardinality protoType (Reflection a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Methods

fieldForm :: Proxy# cardinality -> Proxy# protoType -> FieldNumber -> Reflection a -> MessageBuilder Source #

(ProtoEnum e, FieldForm 'Implicit 'Int32 Int32) => FieldForm 'Implicit ('Enumeration e) (e :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(ProtoEnum e, FieldForm 'Implicit 'Int32 Int32) => FieldForm 'Implicit ('Enumeration e) (Enumerated e :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(ProtoEnum e, FieldForm 'Optional 'Int32 (Identity Int32)) => FieldForm 'Optional ('Enumeration e) (Identity (Enumerated e) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

(ProtoEnum e, FieldForm 'Optional 'Int32 (Identity Int32)) => FieldForm 'Optional ('Enumeration e) (Identity e :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Bool => FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity Bool) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ShortByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Double) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Optional ('Message (Wrapper 'String)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity ShortText) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit protoType a => FieldForm 'Optional ('Message (Wrapper protoType)) (Identity (Wrap a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

FieldForm 'Optional ('Message inner) (Identity (MessageEncoding inner) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message inner) (Identity (MessageEncoder inner) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

FieldForm 'Optional ('Map key value) (Identity (MessageEncoding (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Map key value) (Identity (MessageEncoder (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode.Core

(ToRepeated c e, PackedFieldForm protoType e, FieldForm 'Optional protoType (Identity e)) => FieldForm ('Repeated 'Packed) protoType (c :: Type) Source #

Ignores the preference for packed format when there is exactly one element, and therefore packed format would be more verbose. (Conforming parsers must accept both packed and unpacked primitives regardless of packing preference.)

Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fieldForm :: Proxy# ('Repeated 'Packed) -> Proxy# protoType -> FieldNumber -> c -> MessageBuilder Source #

(ToRepeated c e, FieldForm 'Optional protoType (Identity e)) => FieldForm ('Repeated 'Unpacked) protoType (c :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fieldForm :: Proxy# ('Repeated 'Unpacked) -> Proxy# protoType -> FieldNumber -> c -> MessageBuilder Source #

newtype Wrap a Source #

Indicates that a wrapper type should be emitted by encoding its field, as opposed to by supplying MessageEncoder for the wrapper as a whole.

We also provide specific instances of FieldForm that avoid the need to Wrap certain commonly-used argument types, such as Int32.

See also Wrapper.

Constructors

Wrap 

Fields

Instances

Instances details
Foldable Wrap Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fold :: Monoid m => Wrap m -> m #

foldMap :: Monoid m => (a -> m) -> Wrap a -> m #

foldMap' :: Monoid m => (a -> m) -> Wrap a -> m #

foldr :: (a -> b -> b) -> b -> Wrap a -> b #

foldr' :: (a -> b -> b) -> b -> Wrap a -> b #

foldl :: (b -> a -> b) -> b -> Wrap a -> b #

foldl' :: (b -> a -> b) -> b -> Wrap a -> b #

foldr1 :: (a -> a -> a) -> Wrap a -> a #

foldl1 :: (a -> a -> a) -> Wrap a -> a #

toList :: Wrap a -> [a] #

null :: Wrap a -> Bool #

length :: Wrap a -> Int #

elem :: Eq a => a -> Wrap a -> Bool #

maximum :: Ord a => Wrap a -> a #

minimum :: Ord a => Wrap a -> a #

sum :: Num a => Wrap a -> a #

product :: Num a => Wrap a -> a #

Traversable Wrap Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

traverse :: Applicative f => (a -> f b) -> Wrap a -> f (Wrap b) #

sequenceA :: Applicative f => Wrap (f a) -> f (Wrap a) #

mapM :: Monad m => (a -> m b) -> Wrap a -> m (Wrap b) #

sequence :: Monad m => Wrap (m a) -> m (Wrap a) #

Functor Wrap Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fmap :: (a -> b) -> Wrap a -> Wrap b #

(<$) :: a -> Wrap b -> Wrap a #

FieldForm 'Implicit protoType a => FieldForm 'Optional ('Message (Wrapper protoType)) (Identity (Wrap a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Bounded a => Bounded (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

minBound :: Wrap a #

maxBound :: Wrap a #

Enum a => Enum (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

succ :: Wrap a -> Wrap a #

pred :: Wrap a -> Wrap a #

toEnum :: Int -> Wrap a #

fromEnum :: Wrap a -> Int #

enumFrom :: Wrap a -> [Wrap a] #

enumFromThen :: Wrap a -> Wrap a -> [Wrap a] #

enumFromTo :: Wrap a -> Wrap a -> [Wrap a] #

enumFromThenTo :: Wrap a -> Wrap a -> Wrap a -> [Wrap a] #

Generic (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Associated Types

type Rep (Wrap a) 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

type Rep (Wrap a) = D1 ('MetaData "Wrap" "Proto3.Suite.Form.Encode.Core" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "Wrap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Wrap a -> Rep (Wrap a) x #

to :: Rep (Wrap a) x -> Wrap a #

Num a => Num (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(+) :: Wrap a -> Wrap a -> Wrap a #

(-) :: Wrap a -> Wrap a -> Wrap a #

(*) :: Wrap a -> Wrap a -> Wrap a #

negate :: Wrap a -> Wrap a #

abs :: Wrap a -> Wrap a #

signum :: Wrap a -> Wrap a #

fromInteger :: Integer -> Wrap a #

Read a => Read (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Fractional a => Fractional (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(/) :: Wrap a -> Wrap a -> Wrap a #

recip :: Wrap a -> Wrap a #

fromRational :: Rational -> Wrap a #

Integral a => Integral (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

quot :: Wrap a -> Wrap a -> Wrap a #

rem :: Wrap a -> Wrap a -> Wrap a #

div :: Wrap a -> Wrap a -> Wrap a #

mod :: Wrap a -> Wrap a -> Wrap a #

quotRem :: Wrap a -> Wrap a -> (Wrap a, Wrap a) #

divMod :: Wrap a -> Wrap a -> (Wrap a, Wrap a) #

toInteger :: Wrap a -> Integer #

Real a => Real (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

toRational :: Wrap a -> Rational #

Show a => Show (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

showsPrec :: Int -> Wrap a -> ShowS #

show :: Wrap a -> String #

showList :: [Wrap a] -> ShowS #

Eq a => Eq (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(==) :: Wrap a -> Wrap a -> Bool #

(/=) :: Wrap a -> Wrap a -> Bool #

Ord a => Ord (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

compare :: Wrap a -> Wrap a -> Ordering #

(<) :: Wrap a -> Wrap a -> Bool #

(<=) :: Wrap a -> Wrap a -> Bool #

(>) :: Wrap a -> Wrap a -> Bool #

(>=) :: Wrap a -> Wrap a -> Bool #

max :: Wrap a -> Wrap a -> Wrap a #

min :: Wrap a -> Wrap a -> Wrap a #

type Rep (Wrap a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

type Rep (Wrap a) = D1 ('MetaData "Wrap" "Proto3.Suite.Form.Encode.Core" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "Wrap" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrap") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype Auto a Source #

Asks that its type parameter be chosen to be the most efficient Haskell type that expresses the full range of possible values of the relevant protobuf field.

This choice can be used to resolve ambiguity around polymorphic literal values, or when performing a polymorphic conversion from a type that is not directly encodable, such as Int.

Constructors

Auto 

Fields

Instances

Instances details
Foldable Auto Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fold :: Monoid m => Auto m -> m #

foldMap :: Monoid m => (a -> m) -> Auto a -> m #

foldMap' :: Monoid m => (a -> m) -> Auto a -> m #

foldr :: (a -> b -> b) -> b -> Auto a -> b #

foldr' :: (a -> b -> b) -> b -> Auto a -> b #

foldl :: (b -> a -> b) -> b -> Auto a -> b #

foldl' :: (b -> a -> b) -> b -> Auto a -> b #

foldr1 :: (a -> a -> a) -> Auto a -> a #

foldl1 :: (a -> a -> a) -> Auto a -> a #

toList :: Auto a -> [a] #

null :: Auto a -> Bool #

length :: Auto a -> Int #

elem :: Eq a => a -> Auto a -> Bool #

maximum :: Ord a => Auto a -> a #

minimum :: Ord a => Auto a -> a #

sum :: Num a => Auto a -> a #

product :: Num a => Auto a -> a #

Traversable Auto Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

traverse :: Applicative f => (a -> f b) -> Auto a -> f (Auto b) #

sequenceA :: Applicative f => Auto (f a) -> f (Auto a) #

mapM :: Monad m => (a -> m b) -> Auto a -> m (Auto b) #

sequence :: Monad m => Auto (m a) -> m (Auto a) #

Functor Auto Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

fmap :: (a -> b) -> Auto a -> Auto b #

(<$) :: a -> Auto b -> Auto a #

a ~ Bool => FieldForm 'Implicit 'Bool (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Implicit 'Bytes (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Implicit 'Double (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Implicit 'Fixed32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Implicit 'Fixed64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Implicit 'Float (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'Int32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'Int64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'SFixed32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'SFixed64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Implicit 'SInt32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Implicit 'SInt64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Implicit 'String (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Implicit 'UInt32 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Implicit 'UInt64 (Auto a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Bool => FieldForm 'Optional 'Bool (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Optional 'Bytes (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Optional 'Double (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional 'Fixed32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional 'Fixed64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Optional 'Float (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'Int32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'Int64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'SFixed32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'SFixed64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional 'SInt32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional 'SInt64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Optional 'String (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional 'UInt32 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional 'UInt64 (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Bool => FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Optional ('Message (Wrapper 'String)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Bounded a => Bounded (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

minBound :: Auto a #

maxBound :: Auto a #

Enum a => Enum (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

succ :: Auto a -> Auto a #

pred :: Auto a -> Auto a #

toEnum :: Int -> Auto a #

fromEnum :: Auto a -> Int #

enumFrom :: Auto a -> [Auto a] #

enumFromThen :: Auto a -> Auto a -> [Auto a] #

enumFromTo :: Auto a -> Auto a -> [Auto a] #

enumFromThenTo :: Auto a -> Auto a -> Auto a -> [Auto a] #

Generic (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Associated Types

type Rep (Auto a) 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

type Rep (Auto a) = D1 ('MetaData "Auto" "Proto3.Suite.Form.Encode.Core" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "Auto" 'PrefixI 'True) (S1 ('MetaSel ('Just "unauto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

Methods

from :: Auto a -> Rep (Auto a) x #

to :: Rep (Auto a) x -> Auto a #

Num a => Num (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(+) :: Auto a -> Auto a -> Auto a #

(-) :: Auto a -> Auto a -> Auto a #

(*) :: Auto a -> Auto a -> Auto a #

negate :: Auto a -> Auto a #

abs :: Auto a -> Auto a #

signum :: Auto a -> Auto a #

fromInteger :: Integer -> Auto a #

Read a => Read (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Fractional a => Fractional (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(/) :: Auto a -> Auto a -> Auto a #

recip :: Auto a -> Auto a #

fromRational :: Rational -> Auto a #

Integral a => Integral (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

quot :: Auto a -> Auto a -> Auto a #

rem :: Auto a -> Auto a -> Auto a #

div :: Auto a -> Auto a -> Auto a #

mod :: Auto a -> Auto a -> Auto a #

quotRem :: Auto a -> Auto a -> (Auto a, Auto a) #

divMod :: Auto a -> Auto a -> (Auto a, Auto a) #

toInteger :: Auto a -> Integer #

Real a => Real (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

toRational :: Auto a -> Rational #

Show a => Show (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

showsPrec :: Int -> Auto a -> ShowS #

show :: Auto a -> String #

showList :: [Auto a] -> ShowS #

Eq a => Eq (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

(==) :: Auto a -> Auto a -> Bool #

(/=) :: Auto a -> Auto a -> Bool #

Ord a => Ord (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

Methods

compare :: Auto a -> Auto a -> Ordering #

(<) :: Auto a -> Auto a -> Bool #

(<=) :: Auto a -> Auto a -> Bool #

(>) :: Auto a -> Auto a -> Bool #

(>=) :: Auto a -> Auto a -> Bool #

max :: Auto a -> Auto a -> Auto a #

min :: Auto a -> Auto a -> Auto a #

type Rep (Auto a) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

type Rep (Auto a) = D1 ('MetaData "Auto" "Proto3.Suite.Form.Encode.Core" "proto3-suite-0.9.4-FcQVHEDGj0SLfEGMZSCAeG" 'True) (C1 ('MetaCons "Auto" 'PrefixI 'True) (S1 ('MetaSel ('Just "unauto") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

foldFieldsEncoders :: forall c message (names :: [Symbol]). ToRepeated c (FieldsEncoder message names names) => c -> FieldsEncoder message names names Source #

Combines FieldsEncoder builders for zero or more repeated fields.

message :: forall (name :: Symbol) inner outer (names :: [Symbol]). (ProtoTypeOf outer name ~ 'Message inner, Field name (MessageEncoder inner) outer, KnownFieldNumber outer name) => MessageEncoder inner -> FieldsEncoder outer names (Occupy outer name names) Source #

Specializes the argument type of field to the encoding of a submessage type, which can help to avoid ambiguity when the argument expression is polymorphic.

associations :: forall (name :: Symbol) t (key :: ProtoType) (value :: ProtoType) message (names :: [Symbol]). (ProtoTypeOf message name ~ 'Map key value, CardinalityOf message name ~ 'Repeated 'Unpacked, Field name (t (MessageEncoder (Association key value))) message, KnownFieldNumber message name) => t (MessageEncoder (Association key value)) -> FieldsEncoder message names names Source #

Specializes the argument type of field to be a sequence of key-value pair encodings, which can help to avoid ambiguity when the argument expression is polymorphic.

newtype Reflection a Source #

Signals that the argument to field should be treated as a reflection in Haskell of a protobuf construct, both in its type and in its value.

For example, if the type argument is generated from a protobuf message definition, then field will encode the message whose fields are given by the Haskell data type inside of this newtype.

Repeated fields must be supplied as an appropriately-typed sequence.

For this newtype, Field delegates to MessageField and has its performance characteristics. The creation of temporary reflections of protobuf messages may decrease efficiency in some cases. However, you may find this newtype useful where a mix of techniques is needed, either for compatibility or during a gradual transition to use of Field.

Note that for optional submessages you must use Nested, and for repeated submessages you must use NestedVec. (For submessages within a oneof you can use the reflection type directly.)

To encode a top-level message instead of a field, use messageReflection.

Constructors

Reflection a 

Instances

Instances details
(MessageFieldType cardinality protoType a, MessageField a) => FieldForm cardinality protoType (Reflection a :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

Methods

fieldForm :: Proxy# cardinality -> Proxy# protoType -> FieldNumber -> Reflection a -> MessageBuilder Source #

messageReflection :: Message message => message -> MessageEncoder message Source #

Creates a message encoder by means of type class Message.

To encode a field instead of a top-level message, use Reflection.

Orphan instances

FieldForm 'Implicit 'Bool Bool Source # 
Instance details

FieldForm 'Implicit 'Bytes ByteString Source # 
Instance details

FieldForm 'Implicit 'Bytes ByteString Source # 
Instance details

FieldForm 'Implicit 'Bytes ShortByteString Source # 
Instance details

FieldForm 'Implicit 'Bytes BuildR Source # 
Instance details

FieldForm 'Implicit 'Double Double Source # 
Instance details

FieldForm 'Implicit 'Double Float Source # 
Instance details

FieldForm 'Implicit 'Fixed32 Word16 Source # 
Instance details

FieldForm 'Implicit 'Fixed32 Word32 Source # 
Instance details

FieldForm 'Implicit 'Fixed32 Word8 Source # 
Instance details

FieldForm 'Implicit 'Fixed64 Word16 Source # 
Instance details

FieldForm 'Implicit 'Fixed64 Word32 Source # 
Instance details

FieldForm 'Implicit 'Fixed64 Word64 Source # 
Instance details

FieldForm 'Implicit 'Fixed64 Word8 Source # 
Instance details

FieldForm 'Implicit 'Float Float Source # 
Instance details

FieldForm 'Implicit 'Int32 Int16 Source # 
Instance details

FieldForm 'Implicit 'Int32 Int32 Source # 
Instance details

FieldForm 'Implicit 'Int32 Int8 Source # 
Instance details

FieldForm 'Implicit 'Int32 Word16 Source # 
Instance details

FieldForm 'Implicit 'Int32 Word8 Source # 
Instance details

FieldForm 'Implicit 'Int64 Int16 Source # 
Instance details

FieldForm 'Implicit 'Int64 Int32 Source # 
Instance details

FieldForm 'Implicit 'Int64 Int64 Source # 
Instance details

FieldForm 'Implicit 'Int64 Int8 Source # 
Instance details

FieldForm 'Implicit 'Int64 Word16 Source # 
Instance details

FieldForm 'Implicit 'Int64 Word32 Source # 
Instance details

FieldForm 'Implicit 'Int64 Word8 Source # 
Instance details

FieldForm 'Implicit 'SFixed32 Int16 Source # 
Instance details

FieldForm 'Implicit 'SFixed32 Int32 Source # 
Instance details

FieldForm 'Implicit 'SFixed32 Int8 Source # 
Instance details

FieldForm 'Implicit 'SFixed32 Word16 Source # 
Instance details

FieldForm 'Implicit 'SFixed32 Word8 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Int16 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Int32 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Int64 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Int8 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Word16 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Word32 Source # 
Instance details

FieldForm 'Implicit 'SFixed64 Word8 Source # 
Instance details

FieldForm 'Implicit 'SInt32 Int16 Source # 
Instance details

FieldForm 'Implicit 'SInt32 Int32 Source # 
Instance details

FieldForm 'Implicit 'SInt32 Int8 Source # 
Instance details

FieldForm 'Implicit 'SInt32 Word16 Source # 
Instance details

FieldForm 'Implicit 'SInt32 Word8 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Int16 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Int32 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Int64 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Int8 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Word16 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Word32 Source # 
Instance details

FieldForm 'Implicit 'SInt64 Word8 Source # 
Instance details

FieldForm 'Implicit 'String Text Source # 
Instance details

FieldForm 'Implicit 'String Text Source # 
Instance details

FieldForm 'Implicit 'String ShortText Source # 
Instance details

FieldForm 'Implicit 'UInt32 Word16 Source # 
Instance details

FieldForm 'Implicit 'UInt32 Word32 Source # 
Instance details

FieldForm 'Implicit 'UInt32 Word8 Source # 
Instance details

FieldForm 'Implicit 'UInt64 Word16 Source # 
Instance details

FieldForm 'Implicit 'UInt64 Word32 Source # 
Instance details

FieldForm 'Implicit 'UInt64 Word64 Source # 
Instance details

FieldForm 'Implicit 'UInt64 Word8 Source # 
Instance details

a ~ Bool => FieldForm 'Implicit 'Bool (Auto a :: Type) Source # 
Instance details

a ~ ShortByteString => FieldForm 'Implicit 'Bytes (Auto a :: Type) Source # 
Instance details

a ~ Double => FieldForm 'Implicit 'Double (Auto a :: Type) Source # 
Instance details

a ~ Word32 => FieldForm 'Implicit 'Fixed32 (Auto a :: Type) Source # 
Instance details

a ~ Word64 => FieldForm 'Implicit 'Fixed64 (Auto a :: Type) Source # 
Instance details

a ~ Float => FieldForm 'Implicit 'Float (Auto a :: Type) Source # 
Instance details

a ~ Int32 => FieldForm 'Implicit 'Int32 (Auto a :: Type) Source # 
Instance details

a ~ Int64 => FieldForm 'Implicit 'Int64 (Auto a :: Type) Source # 
Instance details

a ~ Int32 => FieldForm 'Implicit 'SFixed32 (Auto a :: Type) Source # 
Instance details

a ~ Int64 => FieldForm 'Implicit 'SFixed64 (Auto a :: Type) Source # 
Instance details

a ~ Int32 => FieldForm 'Implicit 'SInt32 (Auto a :: Type) Source # 
Instance details

a ~ Int64 => FieldForm 'Implicit 'SInt64 (Auto a :: Type) Source # 
Instance details

a ~ ShortText => FieldForm 'Implicit 'String (Auto a :: Type) Source # 
Instance details

a ~ Word32 => FieldForm 'Implicit 'UInt32 (Auto a :: Type) Source # 
Instance details

a ~ Word64 => FieldForm 'Implicit 'UInt64 (Auto a :: Type) Source # 
Instance details

a ~ Bool => FieldForm 'Optional 'Bool (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Bool (Identity Bool) Source # 
Instance details

FieldForm 'Optional 'Bytes (Identity ByteString) Source # 
Instance details

FieldForm 'Optional 'Bytes (Identity ByteString) Source # 
Instance details

FieldForm 'Optional 'Bytes (Identity ShortByteString) Source # 
Instance details

a ~ ShortByteString => FieldForm 'Optional 'Bytes (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Bytes (Identity BuildR) Source # 
Instance details

a ~ Double => FieldForm 'Optional 'Double (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Double (Identity Double) Source # 
Instance details

FieldForm 'Optional 'Double (Identity Float) Source # 
Instance details

FieldForm 'Optional 'Fixed32 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'Fixed32 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'Fixed32 (Identity Word8) Source # 
Instance details

a ~ Word32 => FieldForm 'Optional 'Fixed32 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Fixed64 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'Fixed64 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'Fixed64 (Identity Word64) Source # 
Instance details

FieldForm 'Optional 'Fixed64 (Identity Word8) Source # 
Instance details

a ~ Word64 => FieldForm 'Optional 'Fixed64 (Identity (Auto a) :: Type) Source # 
Instance details

a ~ Float => FieldForm 'Optional 'Float (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Float (Identity Float) Source # 
Instance details

FieldForm 'Optional 'Int32 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'Int32 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'Int32 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'Int32 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'Int32 (Identity Word8) Source # 
Instance details

a ~ Int32 => FieldForm 'Optional 'Int32 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Int64) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'Int64 (Identity Word8) Source # 
Instance details

a ~ Int64 => FieldForm 'Optional 'Int64 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'SFixed32 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'SFixed32 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'SFixed32 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'SFixed32 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'SFixed32 (Identity Word8) Source # 
Instance details

a ~ Int32 => FieldForm 'Optional 'SFixed32 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Int64) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'SFixed64 (Identity Word8) Source # 
Instance details

a ~ Int64 => FieldForm 'Optional 'SFixed64 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'SInt32 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'SInt32 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'SInt32 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'SInt32 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'SInt32 (Identity Word8) Source # 
Instance details

a ~ Int32 => FieldForm 'Optional 'SInt32 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Int16) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Int32) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Int64) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Int8) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'SInt64 (Identity Word8) Source # 
Instance details

a ~ Int64 => FieldForm 'Optional 'SInt64 (Identity (Auto a) :: Type) Source # 
Instance details

a ~ ShortText => FieldForm 'Optional 'String (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'String (Identity Text) Source # 
Instance details

FieldForm 'Optional 'String (Identity Text) Source # 
Instance details

FieldForm 'Optional 'String (Identity ShortText) Source # 
Instance details

FieldForm 'Optional 'UInt32 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'UInt32 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'UInt32 (Identity Word8) Source # 
Instance details

a ~ Word32 => FieldForm 'Optional 'UInt32 (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional 'UInt64 (Identity Word16) Source # 
Instance details

FieldForm 'Optional 'UInt64 (Identity Word32) Source # 
Instance details

FieldForm 'Optional 'UInt64 (Identity Word64) Source # 
Instance details

FieldForm 'Optional 'UInt64 (Identity Word8) Source # 
Instance details

a ~ Word64 => FieldForm 'Optional 'UInt64 (Identity (Auto a) :: Type) Source # 
Instance details

(ProtoEnum e, FieldForm 'Implicit 'Int32 Int32) => FieldForm 'Implicit ('Enumeration e) (e :: Type) Source # 
Instance details

(ProtoEnum e, FieldForm 'Implicit 'Int32 Int32) => FieldForm 'Implicit ('Enumeration e) (Enumerated e :: Type) Source # 
Instance details

(ProtoEnum e, FieldForm 'Optional 'Int32 (Identity Int32)) => FieldForm 'Optional ('Enumeration e) (Identity (Enumerated e) :: Type) Source # 
Instance details

(ProtoEnum e, FieldForm 'Optional 'Int32 (Identity Int32)) => FieldForm 'Optional ('Enumeration e) (Identity e :: Type) Source # 
Instance details

a ~ Bool => FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity Bool) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ShortByteString) Source # 
Instance details

a ~ ShortByteString => FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity (Auto a) :: Type) Source # 
Instance details

a ~ Double => FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Double) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Float) Source # 
Instance details

a ~ Float => FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity Float) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int32) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int8) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word8) Source # 
Instance details

a ~ Int32 => FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int32) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int64) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int8) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word32) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word8) Source # 
Instance details

a ~ Int64 => FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity (Auto a) :: Type) Source # 
Instance details

a ~ ShortText => FieldForm 'Optional ('Message (Wrapper 'String)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity ShortText) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word32) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word8) Source # 
Instance details

a ~ Word32 => FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity (Auto a) :: Type) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word16) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word32) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word64) Source # 
Instance details

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word8) Source # 
Instance details

a ~ Word64 => FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity (Auto a) :: Type) Source # 
Instance details

(Message message, FromJSONPB message) => FromJSON (MessageEncoder message) Source # 
Instance details

(Message message, ToJSONPB message) => ToJSON (MessageEncoder message) Source # 
Instance details

(Message message, Show message) => Show (MessageEncoder message) Source # 
Instance details

Methods

showsPrec :: Int -> MessageEncoder message -> ShowS #

show :: MessageEncoder message -> String #

showList :: [MessageEncoder message] -> ShowS #

(Message message, FromJSONPB message) => FromJSONPB (MessageEncoder message) Source # 
Instance details

(Message message, ToJSONPB message) => ToJSONPB (MessageEncoder message) Source # 
Instance details