pub struct i48(/* private fields */);
Implementations§
Source§impl i48
impl i48
pub const BITS: u32 = 48u32
pub const MIN: Self
pub const MAX: Self
Sourcepub const unsafe fn from_bits(bits: i64) -> Self
pub const unsafe fn from_bits(bits: i64) -> Self
§Safety
the number must only have the first 6 with zeros, the upper bytes must NOT be filled
Sourcepub const fn new_truncated(bits: i64) -> Self
pub const fn new_truncated(bits: i64) -> Self
truncates the upper bytes and sets them to zero
pub const fn to_bits(self) -> i64
pub const fn swapped_bytes(self) -> [u8; 6]
pub const fn swap_bytes(self) -> Self
pub const fn to_le(self) -> Self
pub const fn to_be(self) -> Self
pub const fn from_ne_bytes(bytes: [u8; 6]) -> Self
pub const fn from_le_bytes(bytes: [u8; 6]) -> Self
pub const fn from_be_bytes(bytes: [u8; 6]) -> Self
pub const fn to_ne_bytes(self) -> [u8; 6]
pub const fn to_le_bytes(self) -> [u8; 6]
pub const fn to_be_bytes(self) -> [u8; 6]
pub const fn get(self) -> i64
Source§impl i48
impl i48
pub const fn from_str_radix( str: &str, radix: u32, ) -> Result<Self, ParseIntError>
Trait Implementations§
Source§impl AddAssign<&i48> for i48
impl AddAssign<&i48> for i48
Source§fn add_assign(&mut self, other: &i48)
fn add_assign(&mut self, other: &i48)
Performs the
+=
operation. Read moreSource§impl AddAssign for i48
impl AddAssign for i48
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+=
operation. Read moreSource§impl DivAssign<&i48> for i48
impl DivAssign<&i48> for i48
Source§fn div_assign(&mut self, other: &i48)
fn div_assign(&mut self, other: &i48)
Performs the
/=
operation. Read moreSource§impl DivAssign for i48
impl DivAssign for i48
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/=
operation. Read moreSource§impl MulAssign<&i48> for i48
impl MulAssign<&i48> for i48
Source§fn mul_assign(&mut self, other: &i48)
fn mul_assign(&mut self, other: &i48)
Performs the
*=
operation. Read moreSource§impl MulAssign for i48
impl MulAssign for i48
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*=
operation. Read moreSource§impl Ord for i48
impl Ord for i48
Source§impl PartialOrd for i48
impl PartialOrd for i48
Source§impl RemAssign<&i48> for i48
impl RemAssign<&i48> for i48
Source§fn rem_assign(&mut self, other: &i48)
fn rem_assign(&mut self, other: &i48)
Performs the
%=
operation. Read moreSource§impl RemAssign for i48
impl RemAssign for i48
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%=
operation. Read moreSource§impl SubAssign<&i48> for i48
impl SubAssign<&i48> for i48
Source§fn sub_assign(&mut self, other: &i48)
fn sub_assign(&mut self, other: &i48)
Performs the
-=
operation. Read moreSource§impl SubAssign for i48
impl SubAssign for i48
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-=
operation. Read moreimpl Copy for i48
impl Eq for i48
Auto Trait Implementations§
impl Freeze for i48
impl RefUnwindSafe for i48
impl Send for i48
impl Sync for i48
impl Unpin for i48
impl UnwindSafe for i48
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