View Source Spannex.Typing (spannex v0.6.3)
Provides typing conversions between Elixir-native types and protobuf types.
Summary
Functions
Decodes a protobuf "type wrapper" into an Elixir-native term.
Encodes an Elixir-native term into a protobuf "type wrapper."
Functions
Decodes a protobuf "type wrapper" into an Elixir-native term.
The first argument is expected to be a valid Spanner data type code.
If the data type code is not recognized or the value is not in a format we know how to convert, the value is returned as-is.
@spec encode(term()) :: Google.Protobuf.Value.t() | Google.Protobuf.ListValue.t() | Google.Protobuf.Struct.t()
Encodes an Elixir-native term into a protobuf "type wrapper."