View Source argo_field_value (argo v1.0.4)

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 is_absent(FieldValue) -> boolean() when FieldValue :: t().
-spec is_labeled(FieldValue) -> boolean() when FieldValue :: t().
-spec is_optional(FieldValue) -> boolean() when FieldValue :: t().
-spec is_present(FieldValue) -> boolean() when FieldValue :: t().
-spec is_required(FieldValue) -> boolean() when FieldValue :: t().
-spec name(FieldValue) -> Name when FieldValue :: t(), Name :: argo_types:name().
Link to this function

optional(FieldWireType, _)

View Source
-spec optional(FieldWireType, none | {some, Value}) -> FieldValue
            when
                FieldWireType :: argo_field_wire_type:t(),
                Value :: argo_value:t(),
                FieldValue :: t().
Link to this function

required(FieldWireType, Value)

View Source
-spec required(FieldWireType, Value) -> FieldValue
            when
                FieldWireType :: argo_field_wire_type:t(),
                Value :: argo_value:t(),
                FieldValue :: t().
Link to this function

to_field_wire_type(FieldValue)

View Source
-spec to_field_wire_type(FieldValue) -> FieldWireType
                      when FieldValue :: t(), FieldWireType :: argo_field_wire_type:t().