pub struct SetDef {
pub name: String,
pub encoding_type: PrimitiveType,
pub choices: Vec<SetChoice>,
pub description: Option<String>,
}Expand description
Set (bitfield) type definition.
Fields§
§name: StringType name.
encoding_type: PrimitiveTypeUnderlying encoding type.
choices: Vec<SetChoice>Bit choices.
description: Option<String>Description.
Implementations§
Source§impl SetDef
impl SetDef
Sourcepub fn new(name: String, encoding_type: PrimitiveType) -> Self
pub fn new(name: String, encoding_type: PrimitiveType) -> Self
Creates a new set type definition.
Sourcepub fn add_choice(&mut self, choice: SetChoice)
pub fn add_choice(&mut self, choice: SetChoice)
Adds a choice to the set.
Sourcepub fn get_choice(&self, name: &str) -> Option<&SetChoice>
pub fn get_choice(&self, name: &str) -> Option<&SetChoice>
Looks up a choice by name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SetDef
impl RefUnwindSafe for SetDef
impl Send for SetDef
impl Sync for SetDef
impl Unpin for SetDef
impl UnwindSafe for SetDef
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