View Source argo_field_value (argo v1.0.2)
Summary
Types
-type inner() :: {optional, none | {some, argo_value:t()}} | {required, argo_value:t()}.
-type t() :: #argo_field_value{}.
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().
-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().