View Source argo_wire_type (argo v1.0.8)

Summary

Types

-type t() :: #argo_wire_type{inner :: argo_wire_type:inner()}.
-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(ArrayWireType) -> WireType when ArrayWireType :: argo_array_wire_type:t(), WireType :: t().
-spec block(BlockWireType) -> WireType when BlockWireType :: argo_block_wire_type:t(), WireType :: t().
-spec desc() -> WireType when WireType :: t().
Link to this function

display(IoDevice, WireType, Options)

View Source
-spec display(IoDevice, WireType, Options) -> ok
           when
               IoDevice :: io:device(),
               WireType :: t(),
               Options :: argo_wire_type_printer:options().
-spec error() -> WireType when WireType :: t().
-spec extensions() -> WireType when WireType :: t().
Link to this function

fold_path_values(Function, AccIn, WireType)

View Source
-spec fold_path_values(Function, AccIn, WireType) -> AccOut
                    when
                        Function :: fun((PathValue, AccIn) -> AccOut),
                        AccIn :: dynamic(),
                        WireType :: argo_wire_type:t(),
                        PathValue :: argo_path_value:t(),
                        AccOut :: dynamic().
Link to this function

format(WireType, Options)

View Source
-spec format(WireType, Options) -> Output
          when
              WireType :: t(),
              Options :: argo_wire_type_printer:options(),
              Output :: unicode:unicode_binary().
-spec from_json(JsonValue) -> WireType when JsonValue :: argo_json:json_value(), WireType :: t().
-spec from_reader(Reader) -> {Reader, WireType} when Reader :: binary(), WireType :: t().
-spec is_array(WireType) -> boolean() when WireType :: t().
-spec is_block(WireType) -> boolean() when WireType :: t().
-spec is_desc(WireType) -> boolean() when WireType :: t().
-spec is_error(WireType) -> boolean() when WireType :: t().
-spec is_extensions(WireType) -> boolean() when WireType :: t().
-spec is_labeled(WireType) -> boolean() when WireType :: t().
-spec is_nullable(WireType) -> boolean() when WireType :: t().
-spec is_path(WireType) -> boolean() when WireType :: t().
-spec is_record(WireType) -> boolean() when WireType :: t().
-spec is_scalar(WireType) -> boolean() when WireType :: t().
Link to this function

nullable(NullableWireType)

View Source
-spec nullable(NullableWireType) -> WireType
            when NullableWireType :: argo_nullable_wire_type:t(), WireType :: t().
-spec path() -> WireType when WireType :: t().
-spec record(RecordWireType) -> WireType
          when RecordWireType :: argo_record_wire_type:t(), WireType :: t().
-spec scalar(ScalarWireType) -> WireType
          when ScalarWireType :: argo_scalar_wire_type:t(), WireType :: t().
-spec to_json(WireType) -> JsonValue when WireType :: t(), JsonValue :: argo_json:json_value().
Link to this function

to_json(WireType, Options)

View Source
-spec to_json(WireType, Options) -> JsonValue
           when
               WireType :: t(),
               Options :: argo_json_wire_type_encoder:options(),
               JsonValue :: argo_json:json_value().
-spec to_writer(WireType) -> Writer when WireType :: t(), Writer :: binary().
Link to this function

to_writer(WireType, Header)

View Source
-spec to_writer(WireType, Header) -> Writer
             when WireType :: t(), Header :: argo_header:t(), Writer :: binary().
Link to this function

xform(TypeIn, AccIn, Fun)

View Source
-spec xform(TypeIn, AccIn, Fun) -> {TypeOut, AccOut}
         when
             TypeIn :: dynamic(),
             AccIn :: dynamic(),
             Fun :: xform_func(TypeIn, AccIn, TypeOut, AccOut),
             TypeOut :: dynamic(),
             AccOut :: dynamic().