Struct bit_struct::i48
source · pub struct i48(_);
Expand description
An unsigned integer which contains 48 bits
Implementations
sourceimpl i48
impl i48
sourceimpl i48
impl i48
sourcepub fn from_be_bytes(bytes: [u8; 6]) -> Self
pub fn from_be_bytes(bytes: [u8; 6]) -> Self
Convert from an array of bytes, in big-endian order
sourcepub fn to_be_bytes(self) -> [u8; 6]
pub fn to_be_bytes(self) -> [u8; 6]
Convert self
into an array of bytes, in big-endian order
sourcepub fn from_le_bytes(bytes: [u8; 6]) -> Self
pub fn from_le_bytes(bytes: [u8; 6]) -> Self
Convert from an array of bytes, in little-endian order
sourcepub fn to_le_bytes(self) -> [u8; 6]
pub fn to_le_bytes(self) -> [u8; 6]
Convert self
into an array of bytes, in little-endian order
Trait Implementations
sourceimpl BitAndAssign<i48> for i48
impl BitAndAssign<i48> for i48
sourcefn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moresourceimpl BitOrAssign<i48> for i48
impl BitOrAssign<i48> for i48
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moresourceimpl BitXorAssign<i48> for i48
impl BitXorAssign<i48> for i48
sourcefn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^=
operation. Read moresourceimpl<'de> Deserialize<'de> for i48
impl<'de> Deserialize<'de> for i48
sourcefn 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
sourceimpl FieldStorage for i48
impl FieldStorage for i48
type StoredType = u64
type StoredType = u64
The type this field stores as
sourcefn inner_raw(self) -> Self::StoredType
fn inner_raw(self) -> Self::StoredType
Get the raw representation of this value
sourceimpl Num for i48
impl Num for i48
type FromStrRadixErr = ()
sourcefn 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 moresourceimpl Ord for i48
impl Ord for i48
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<i48> for i48
impl PartialOrd<i48> for i48
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl ShlAssign<usize> for i48
impl ShlAssign<usize> for i48
sourcefn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<=
operation. Read moresourceimpl ShrAssign<usize> for i48
impl ShrAssign<usize> for i48
sourcefn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
Performs the
>>=
operation. Read moresourceimpl<P> ValidCheck<P> for i48
impl<P> ValidCheck<P> for i48
sourceconst 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 Read more
impl Copy for i48
impl Eq for i48
impl StructuralEq for i48
impl StructuralPartialEq for i48
Auto Trait Implementations
impl RefUnwindSafe for i48
impl Send for i48
impl Sync for i48
impl Unpin for i48
impl UnwindSafe for i48
Blanket Implementations
sourceimpl<T> BitStructZero for Twhere
T: Zero,
impl<T> BitStructZero for Twhere
T: Zero,
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more