Struct mini_functions::errors::traits::TraitBuilder
source · pub struct TraitBuilder {
pub traits: Vec<Trait>,
}
Expand description
A struct to manage a collection of Trait instances.
Fields§
§traits: Vec<Trait>
A vector of Trait instances
Implementations§
source§impl TraitBuilder
impl TraitBuilder
sourcepub fn new() -> TraitBuilder
pub fn new() -> TraitBuilder
Creates a new instance of TraitBuilder.
sourcepub fn add_trait(&mut self, label: &str) -> &Trait
pub fn add_trait(&mut self, label: &str) -> &Trait
Adds a new Trait instance with the given label to the collection.
sourcepub fn get_trait(&self, label: &str) -> Option<&Trait>
pub fn get_trait(&self, label: &str) -> Option<&Trait>
Finds and returns the Trait instance with the given label.
sourcepub fn delete_trait(&mut self, label: &str) -> bool
pub fn delete_trait(&mut self, label: &str) -> bool
Deletes the Trait instance with the given label from the collection.
Trait Implementations§
source§impl Default for TraitBuilder
impl Default for TraitBuilder
source§fn default() -> TraitBuilder
fn default() -> TraitBuilder
A default implementation of TraitBuilder, creating a new instance of TraitBuilder.
Auto Trait Implementations§
impl RefUnwindSafe for TraitBuilder
impl Send for TraitBuilder
impl Sync for TraitBuilder
impl Unpin for TraitBuilder
impl UnwindSafe for TraitBuilder
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
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.