pub struct GroupDef {
pub name: String,
pub id: u16,
pub block_length: u16,
pub dimension_type: String,
pub description: Option<String>,
pub since_version: Option<u16>,
pub deprecated: Option<u16>,
pub fields: Vec<FieldDef>,
pub nested_groups: Vec<GroupDef>,
pub data_fields: Vec<DataFieldDef>,
}Expand description
Repeating group definition.
Fields§
§name: StringGroup name.
id: u16Group ID.
block_length: u16Block length of each entry.
dimension_type: StringDimension type (usually groupSizeEncoding).
description: Option<String>Description.
since_version: Option<u16>Since version.
deprecated: Option<u16>Deprecated since version.
fields: Vec<FieldDef>Fields within each group entry.
nested_groups: Vec<GroupDef>Nested groups within each entry.
data_fields: Vec<DataFieldDef>Variable-length data within each entry.
Implementations§
Source§impl GroupDef
impl GroupDef
Sourcepub fn add_nested_group(&mut self, group: GroupDef)
pub fn add_nested_group(&mut self, group: GroupDef)
Adds a nested group.
Sourcepub fn add_data_field(&mut self, data_field: DataFieldDef)
pub fn add_data_field(&mut self, data_field: DataFieldDef)
Adds a data field to the group.
Sourcepub fn has_nested_groups(&self) -> bool
pub fn has_nested_groups(&self) -> bool
Returns true if the group has nested groups.
Sourcepub fn has_var_data(&self) -> bool
pub fn has_var_data(&self) -> bool
Returns true if the group has variable-length data.
Sourcepub const fn header_size(&self) -> usize
pub const fn header_size(&self) -> usize
Returns the header size (typically 4 bytes for groupSizeEncoding).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GroupDef
impl RefUnwindSafe for GroupDef
impl Send for GroupDef
impl Sync for GroupDef
impl Unpin for GroupDef
impl UnwindSafe for GroupDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more