View Source argo_record_value (argo v1.1.0)

Summary

Types

-type index() :: argo_index_map:index().
-opaque iterator()
-type iterator_order() :: ordered | reversed | key_func() | order_func().
-type key() :: argo_types:name().
-type key_func() :: fun((Index :: index(), Key :: key(), Value :: value()) -> Key :: dynamic()).
-type order_func() :: argo_index_map:iterator_order_func(key(), value()).
-type t() :: #argo_record_value{fields :: argo_index_map:t(argo_types:name(), argo_field_value:t())}.
-type value() :: argo_field_value:t().

Functions

-spec find(RecordValue, Name) -> {ok, FieldValue} | error
        when RecordValue :: t(), Name :: argo_types:name(), FieldValue :: argo_field_value:t().
Link to this function

find_index(RecordValue, Index)

View Source
-spec find_index(RecordValue, Index) -> {ok, FieldValue} | error
              when
                  RecordValue :: t(),
                  Index :: argo_index_map:index(),
                  FieldValue :: argo_field_value:t().
Link to this function

find_index_of(RecordValue, Name)

View Source
-spec find_index_of(RecordValue, Name) -> {ok, Index, FieldValue} | error
                 when
                     RecordValue :: t(),
                     Name :: argo_types:name(),
                     Index :: argo_index_map:index(),
                     FieldValue :: argo_field_value:t().
Link to this function

insert(RecordValue, FieldValue)

View Source
-spec insert(RecordValue, FieldValue) -> RecordValue
          when RecordValue :: t(), FieldValue :: argo_field_value:t().
-spec iterator(RecordValue) -> Iterator when RecordValue :: t(), Iterator :: iterator().
Link to this function

iterator(RecordValue, Order)

View Source
-spec iterator(RecordValue, Order) -> Iterator
            when RecordValue :: t(), Order :: iterator_order(), Iterator :: iterator().
-spec new() -> RecordValue when RecordValue :: t().
-spec next(Iterator) -> none | {Index, Key, Value, NextIterator}
        when
            Index :: index(),
            Key :: key(),
            Value :: value(),
            Iterator :: iterator(),
            NextIterator :: iterator().
Link to this function

present_fields_count(RecordValue)

View Source
-spec present_fields_count(RecordValue) -> non_neg_integer() when RecordValue :: t().
Link to this function

to_record_wire_type(RecordValue)

View Source
-spec to_record_wire_type(RecordValue) -> RecordWireType
                       when RecordValue :: t(), RecordWireType :: argo_record_wire_type:t().