Struct bit_struct::u2
source · pub struct u2(_);
Expand description
An unsigned integer which contains 2 bits
Implementations§
Trait Implementations§
source§impl BitAndAssign<u2> for u2
impl BitAndAssign<u2> for u2
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moresource§impl BitOrAssign<u2> for u2
impl BitOrAssign<u2> for u2
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresource§impl BitXorAssign<u2> for u2
impl BitXorAssign<u2> for u2
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moresource§impl<'de> Deserialize<'de> for u2
impl<'de> Deserialize<'de> for u2
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl FieldStorage for u2
impl FieldStorage for u2
§type StoredType = u8
type StoredType = u8
The type this field stores as
source§fn inner_raw(self) -> Self::StoredType
fn inner_raw(self) -> Self::StoredType
Get the raw representation of this value
source§impl Num for u2
impl Num for u2
type FromStrRadixErr = ()
source§fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
fn from_str_radix(str: &str, radix: u32) -> Result<Self, Self::FromStrRadixErr>
Convert from a string and radix (typically
2..=36
). Read moresource§impl Ord for u2
impl Ord for u2
source§impl PartialOrd<u2> for u2
impl PartialOrd<u2> for u2
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl ShlAssign<usize> for u2
impl ShlAssign<usize> for u2
source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<=
operation. Read moresource§impl ShrAssign<usize> for u2
impl ShrAssign<usize> for u2
source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>=
operation. Read moresource§impl<P> ValidCheck<P> for u2
impl<P> ValidCheck<P> for u2
source§const ALWAYS_VALID: bool = true
const ALWAYS_VALID: bool = true
Set this to true if, at compile-time, we can tell that all bit
representations which contain the appropriate number of bits are valid
representations of this type