pub enum BitConstraint {
Unrestrained,
Defined(bool),
Restrained,
}Expand description
Represent how a bit is limited in a pattern
Variants§
Implementations§
Source§impl BitConstraint
impl BitConstraint
Source§impl BitConstraint
impl BitConstraint
pub fn define(self, bit: bool) -> Option<Self>
Sourcepub fn most_restrictive(self, other: Self) -> Option<Self>
pub fn most_restrictive(self, other: Self) -> Option<Self>
select the most restrictive from both, None if they conflict
Sourcepub fn least_restrictive(self, other: Self) -> Self
pub fn least_restrictive(self, other: Self) -> Self
select the least restrictive from both
Trait Implementations§
Source§impl Clone for BitConstraint
impl Clone for BitConstraint
Source§fn clone(&self) -> BitConstraint
fn clone(&self) -> BitConstraint
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 BitConstraint
impl Debug for BitConstraint
Source§impl Default for BitConstraint
impl Default for BitConstraint
Source§fn default() -> BitConstraint
fn default() -> BitConstraint
Returns the “default value” for a type. Read more
impl Copy for BitConstraint
Auto Trait Implementations§
impl Freeze for BitConstraint
impl RefUnwindSafe for BitConstraint
impl Send for BitConstraint
impl Sync for BitConstraint
impl Unpin for BitConstraint
impl UnwindSafe for BitConstraint
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