View Source argo_field_value (argo v1.0.10)
Summary
Types
-type inner() :: {optional, none | {some, argo_value:t()}} | {required, argo_value:t()}.
-type t() :: #argo_field_value{wire_type :: argo_field_wire_type:t(), inner :: argo_field_value:inner()}.
Functions
-spec fetch(FieldValue) -> {ok, Value} | error when FieldValue :: t(), Value :: argo_value:t().
-spec name(FieldValue) -> Name when FieldValue :: t(), Name :: argo_types:name().
-spec optional(FieldWireType, none | {some, Value}) -> FieldValue when FieldWireType :: argo_field_wire_type:t(), Value :: argo_value:t(), FieldValue :: t().
-spec required(FieldWireType, Value) -> FieldValue when FieldWireType :: argo_field_wire_type:t(), Value :: argo_value:t(), FieldValue :: t().
-spec to_field_wire_type(FieldValue) -> FieldWireType when FieldValue :: t(), FieldWireType :: argo_field_wire_type:t().