Skip to main content

Module fields

Module fields 

Source
Expand description

Typed metadata fields: the developer-facing view of a group’s AppData dictionary.

xmtp_mls’s MlsGroup metadata-field methods (metadata_fields, metadata_values, user_data, update_metadata_field, update_user_data, …) read and write application and public well-known components here. The bindings do not expose them yet. Everything is a pure function of one committed dictionary: a FieldSnapshot lists the fields its registry describes, decodes their values, and encodes writes. Nothing here consults the network or storage.

§Authority

The committed registry is the only authority for a field’s existence and policy. A well-known field’s type is fixed by the protocol (component_type); an application field’s type is its registry entry’s tag. The backend catalogue only supplies the label of an application field and so the name that FieldSnapshot::field matches. A registry entry that does not decode is preserved in the dictionary but is not a field.

Structs§

FieldSnapshot
The metadata fields of one dictionary and their values.
FieldWrite
An encoded write, fixed to the type it was encoded under. FieldSnapshot::resolve_writes refuses it if the field’s type changed.
MapEntry
MetadataFieldDescriptor
A field listed by FieldSnapshot::fields.
MetadataFieldRef
Names a metadata field: its component ID and, when one exists, its well-known or backend catalogue name.
MetadataFieldValue
A field and its value, absent when the group holds none.
UserFieldUpdate
Set (Some) or clear (None) the caller’s own entry of a user field.
UserFieldValue
One inbox’s value of a user field.

Enums§

ComponentMutation
A write to one field. Map and set deltas apply atomically: an Insert of a present key, or an Update or Delete of an absent key, rejects the whole commit.
FieldError
FieldKey
A map or set key.
FieldValue
A scalar value or map value.
MapMutation
One key-level change to a map field.
MetadataComponentType
The shape of a field’s value.
MetadataKeyType
The type of a map or set key.
MetadataScalarType
The type of a scalar field or of a map value.
MetadataValue
A decoded field value.
SetMutation
One key-level change to a set field.
WriteOperation