View Source argo_value (argo v1.0.3)
Summary
Types
-type inner() :: argo_array_value:t() | argo_block_value:t() | argo_desc_value:t() | argo_error_value:t() | argo_extensions_value:t() | argo_nullable_value:t() | argo_path_value:t() | argo_record_value:t() | argo_scalar_value:t().
-type t() :: #argo_value{}.
-type xform_action() :: cont | skip.
-type xform_func(Type, Acc) :: xform_func(Type, Acc, Type, Acc).
-type xform_func(TypeIn, AccIn, TypeOut, AccOut) :: fun((TypeIn, AccIn) -> xform_result(TypeOut, AccOut)).
-type xform_result(TypeOut, AccOut) :: xform_action() | {xform_action(), AccOut} | {xform_action(), TypeOut, AccOut}.
Functions
-spec array(ArrayValue) -> Value when ArrayValue :: argo_array_value:t(), Value :: t().
-spec block(BlockValue) -> Value when BlockValue :: argo_block_value:t(), Value :: t().
-spec desc(DescValue) -> Value when DescValue :: argo_desc_value:t(), Value :: t().
-spec display(Value) -> ok when Value :: t().
-spec error(ErrorValue) -> Value when ErrorValue :: argo_error_value:t(), Value :: t().
-spec extensions(ExtensionsValue) -> Value when ExtensionsValue :: argo_extensions_value:t(), Value :: t().
-spec format(Value) -> Output when Value :: t(), Output :: iolist().
-spec format_with_lines(Value) -> unicode:unicode_binary() when Value :: t().
-spec from_json(WireType, JsonValue) -> Value when WireType :: argo_wire_type:t(), JsonValue :: argo_json:json_value(), Value :: t().
Link to this function
from_json(WireType, JsonValue, JsonScalarDecoderModule, JsonScalarDecoderOptions)
View Source-spec from_json(WireType, JsonValue, JsonScalarDecoderModule, JsonScalarDecoderOptions) -> Value when WireType :: argo_wire_type:t(), JsonValue :: argo_json:json_value(), JsonScalarDecoderModule :: module(), JsonScalarDecoderOptions :: argo_json_scalar_decoder:options(), Value :: t().
-spec from_reader(WireType, Reader) -> {Reader, Value} when WireType :: argo_wire_type:t(), Reader :: binary(), Value :: t().
-spec is_array(Value) -> boolean() when Value :: t().
-spec is_block(Value) -> boolean() when Value :: t().
-spec is_desc(Value) -> boolean() when Value :: t().
-spec is_error(Value) -> boolean() when Value :: t().
-spec is_extensions(Value) -> boolean() when Value :: t().
-spec is_labeled(Value) -> boolean() when Value :: t().
-spec is_nullable(Value) -> boolean() when Value :: t().
-spec is_path(Value) -> boolean() when Value :: t().
-spec is_record(Value) -> boolean() when Value :: t().
-spec is_scalar(Value) -> boolean() when Value :: t().
-spec nullable(NullableValue) -> Value when NullableValue :: argo_nullable_value:t(), Value :: t().
-spec path(PathValue) -> Value when PathValue :: argo_path_value:t(), Value :: t().
-spec record(RecordValue) -> Value when RecordValue :: argo_record_value:t(), Value :: t().
-spec scalar(ScalarValue) -> Value when ScalarValue :: argo_scalar_value:t(), Value :: t().
-spec to_json(Value) -> JsonValue when Value :: t(), JsonValue :: argo_json:json_value().
-spec to_json(Value, JsonScalarEncoderModule, JsonScalarEncoderOptions) -> JsonValue when Value :: t(), JsonScalarEncoderModule :: module(), JsonScalarEncoderOptions :: argo_json_scalar_encoder:options(), JsonValue :: argo_json:json_value().
-spec to_wire_type(Value) -> WireType when Value :: t(), WireType :: argo_wire_type:t().
-spec to_writer(Value) -> Writer when Value :: t(), Writer :: binary().
-spec to_writer(Value, Header) -> Writer when Value :: t(), Header :: argo_header:t(), Writer :: binary().
-spec xform(TypeIn, AccIn, Fun) -> {TypeOut, AccOut} when TypeIn :: dynamic(), AccIn :: dynamic(), Fun :: xform_func(TypeIn, AccIn, TypeOut, AccOut), TypeOut :: dynamic(), AccOut :: dynamic().