pub struct TypeRef {
pub primitive: bool,
pub primitive_type: Option<FieldType>,
pub fixup_type: Option<usize>,
pub encoded: u32,
}Expand description
A type reference value: a primitive type or a type of the document’s type list.
A reference to a type of the document is slot << 2 | low bits in TypeRef::encoded, where slot indexes the
EFIX type list (Document::fixup_type_guids), the list the instances’ types are named from too. It is not an index
into the reflection table: Document::type_ref_target finds the reflected type a slot names.
Fields§
§primitive: boolWhether the reference names a primitive type rather than a type of the document.
primitive_type: Option<FieldType>The primitive type, when primitive is set.
fixup_type: Option<usize>Index into Document::fixup_type_guids, when the reference names a type of the document (encoded >> 2).
encoded: u32The reference as stored (u32): the writer emits this, so a changed TypeRef::fixup_type takes effect through
TypeRef::with_fixup_type. The low two bits are kept as stored; their meaning is not known.