Struct kiwi_schema::Def [] [src]

pub struct Def {
    pub name: String,
    pub index: i32,
    pub kind: DefKind,
    pub fields: Vec<Field>,
    pub field_value_to_index: HashMap<u32, usize>,
}

Represents a single definition in a BinarySchema. Kiwi enums, structs, and messages are all represented using this object.

Fields

The name of this field from the textual Kiwi schema.

The index of this Def in the defs field of the parent BinarySchema. This is used as the type identifier for any fields with this type.

Either Enum, Struct, or Message.

All fields in this definition. The order matters for struct definitions.

Maps the value member of each Field in the fields array to its index in that array. This is helpful when decoding a field to be able to quickly get to the field metadata.

Methods

impl Def
[src]

[src]

Returns the Field with the provided name if one exists.

Trait Implementations

impl Debug for Def
[src]

[src]

Formats the value using the given formatter.