pub struct i40(/* private fields */);
Expand description
An unsigned integer which contains 40 bits
Implementations§
Source§impl i40
impl i40
Source§impl i40
impl i40
Sourcepub fn from_be_bytes(bytes: [u8; 5]) -> Self
pub fn from_be_bytes(bytes: [u8; 5]) -> Self
Convert from an array of bytes, in big-endian order
Sourcepub fn to_be_bytes(self) -> [u8; 5]
pub fn to_be_bytes(self) -> [u8; 5]
Convert self
into an array of bytes, in big-endian order
Sourcepub fn from_le_bytes(bytes: [u8; 5]) -> Self
pub fn from_le_bytes(bytes: [u8; 5]) -> Self
Convert from an array of bytes, in little-endian order
Sourcepub fn to_le_bytes(self) -> [u8; 5]
pub fn to_le_bytes(self) -> [u8; 5]
Convert self
into an array of bytes, in little-endian order
Trait Implementations§
Source§impl BitAndAssign for i40
impl BitAndAssign for i40
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&=
operation. Read moreSource§impl BitOrAssign for i40
impl BitOrAssign for i40
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|=
operation. Read moreSource§impl BitXorAssign for i40
impl BitXorAssign for i40
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 i40
impl<'de> Deserialize<'de> for i40
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 i40
impl FieldStorage for i40
Source§type StoredType = u64
type StoredType = u64
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 i40
impl Num for i40
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 i40
impl Ord for i40
Source§impl PartialOrd for i40
impl PartialOrd for i40
Source§impl ShlAssign<usize> for i40
impl ShlAssign<usize> for i40
Source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
Performs the
<<=
operation. Read moreSource§impl ShrAssign<usize> for i40
impl ShrAssign<usize> for i40
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 i40
impl<P> ValidCheck<P> for i40
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
impl Copy for i40
impl Eq for i40
impl StructuralPartialEq for i40
Auto Trait Implementations§
impl Freeze for i40
impl RefUnwindSafe for i40
impl Send for i40
impl Sync for i40
impl Unpin for i40
impl UnwindSafe for i40
Blanket Implementations§
Source§impl<T> BitStructZero for Twhere
T: Zero,
impl<T> BitStructZero for Twhere
T: Zero,
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