Field State
Reads one entity update into an entity's value tree, and stores decoded field values by field path.
See also: How Entities Are Decoded, Part 4: Field State for an explanation with real examples.
Generated API
gem.schema.field_reader.read_fields
read_fields
python
def read_fields(r: BitReader, serializer: Serializer, state: FieldState) -> NoneRead all field-path/value pairs from r into state.
Source: src/gem/schema/field_reader.py:96
gem.schema.field_state.FieldState
FieldState
python
class FieldStateNested mutable tree that stores decoded field values.
Source: src/gem/schema/field_state.py:23
Methods
get
Signature: def FieldState.get(self, fp: FieldPath) -> FieldValue
Read the value at the given field path.
Source: src/gem/schema/field_state.py:48
set
Signature: def FieldState.set(self, fp: FieldPath, value: FieldValue) -> None
Write a value at the given field path, growing the tree as needed.
Source: src/gem/schema/field_state.py:95