andreasewering / elm-protoc-types / Proto.Google.Protobuf.FileOptions

This file was automatically generated by

To run it, add a dependency via elm install on elm-protocol-buffers version latest or higher.


type OptimizeMode
    = SPEED
    | CODESIZE
    | LITERUNTIME

Generated classes can be optimized for speed or code size.

decodeOptimizeMode : Protobuf.Decode.Decoder OptimizeMode

Declares how to decode a OptimizeMode from Bytes. To actually perform the conversion from Bytes, you need to use Protobuf.Decode.decode from eriktim/elm-protocol-buffers.

defaultOptimizeMode : OptimizeMode

Default for OptimizeMode. Should only be used for 'required' decoders as an initial value.

encodeOptimizeMode : OptimizeMode -> Protobuf.Encode.Encoder

Declares how to encode a OptimizeMode to Bytes. To actually perform the conversion to Bytes, you need to use Protobuf.Encode.encode from eriktim/elm-protocol-buffers.

fieldNumbersOptimizeMode : OptimizeMode -> Basics.Int

The field numbers for the fields of OptimizeMode. This is mostly useful for internals, like documentation generation.

fromInternalOptimizeMode : Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFileOptionsOptimizeMode -> OptimizeMode

Convert the internal type Proto__Google__Protobuf__FileOptions__OptimizeMode into a OptimizeMode.

Using two different types is necessary to avoid recursive module references while having readable constructor names.

jsonEncodeOptimizeMode : OptimizeMode -> Json.Encode.Value

Encode a OptimizeMode to JSON. Uses the canonical encoding described here: https://protobuf.dev/programming-guides/proto3/#json

toInternalOptimizeMode : OptimizeMode -> Proto.Google.Protobuf.Internals_.ProtoGoogleProtobufFileOptionsOptimizeMode

Convert a OptimizeMode into its internal representation Proto__Google__Protobuf__FileOptions__OptimizeMode.

Using two different types is necessary to avoid recursive module references while having readable constructor names.