pub struct NonEmptyStrainFlags(/* private fields */);Expand description
A guaranteed non-empty StrainFlags
Analogous to NonZero — constructable only if the
flags are non-empty, ensuring callers cannot accidentally pass an empty set
to functions that require at least one strain.
Implementations§
Source§impl NonEmptyStrainFlags
impl NonEmptyStrainFlags
Sourcepub const fn new(flags: StrainFlags) -> Option<Self>
pub const fn new(flags: StrainFlags) -> Option<Self>
Wrap flags if non-empty, otherwise return None
Sourcepub const fn get(self) -> StrainFlags
pub const fn get(self) -> StrainFlags
Extract the inner StrainFlags
Trait Implementations§
Source§impl Clone for NonEmptyStrainFlags
impl Clone for NonEmptyStrainFlags
Source§fn clone(&self) -> NonEmptyStrainFlags
fn clone(&self) -> NonEmptyStrainFlags
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NonEmptyStrainFlags
impl Debug for NonEmptyStrainFlags
Source§impl From<NonEmptyStrainFlags> for StrainFlags
impl From<NonEmptyStrainFlags> for StrainFlags
Source§fn from(flags: NonEmptyStrainFlags) -> Self
fn from(flags: NonEmptyStrainFlags) -> Self
Converts to this type from the input type.
Source§impl Hash for NonEmptyStrainFlags
impl Hash for NonEmptyStrainFlags
Source§impl PartialEq for NonEmptyStrainFlags
impl PartialEq for NonEmptyStrainFlags
impl Copy for NonEmptyStrainFlags
impl Eq for NonEmptyStrainFlags
impl StructuralPartialEq for NonEmptyStrainFlags
Auto Trait Implementations§
impl Freeze for NonEmptyStrainFlags
impl RefUnwindSafe for NonEmptyStrainFlags
impl Send for NonEmptyStrainFlags
impl Sync for NonEmptyStrainFlags
impl Unpin for NonEmptyStrainFlags
impl UnsafeUnpin for NonEmptyStrainFlags
impl UnwindSafe for NonEmptyStrainFlags
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