pub struct LeI64(/* private fields */);Expand description
64-bit signed little-endian integer. Alignment 1.
Used for timestamps (unix_timestamp is i64), deltas, and any signed arithmetic in account data.
Implementations§
Source§impl LeI64
impl LeI64
Sourcepub const fn to_le_bytes(self) -> [u8; 8]
pub const fn to_le_bytes(self) -> [u8; 8]
Raw little-endian bytes.
Sourcepub const fn from_le_bytes(bytes: [u8; 8]) -> Self
pub const fn from_le_bytes(bytes: [u8; 8]) -> Self
Construct from raw little-endian bytes.
Sourcepub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn checked_add(self, rhs: Self) -> Option<Self>
Checked addition.
Sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked subtraction.
Sourcepub const fn checked_mul(self, rhs: Self) -> Option<Self>
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked multiplication.
Sourcepub const fn checked_div(self, rhs: Self) -> Option<Self>
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked division.
Sourcepub const fn saturating_add(self, rhs: Self) -> Self
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating addition.
Sourcepub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating subtraction.
Sourcepub const fn is_negative(self) -> bool
pub const fn is_negative(self) -> bool
Whether the value is negative.
Trait Implementations§
Source§impl AddAssign<i64> for LeI64
impl AddAssign<i64> for LeI64
Source§fn add_assign(&mut self, rhs: i64)
fn add_assign(&mut self, rhs: i64)
Performs the
+= operation. Read moreSource§impl AddAssign for LeI64
impl AddAssign for LeI64
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<i64> for LeI64
impl DivAssign<i64> for LeI64
Source§fn div_assign(&mut self, rhs: i64)
fn div_assign(&mut self, rhs: i64)
Performs the
/= operation. Read moreSource§impl DivAssign for LeI64
impl DivAssign for LeI64
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<i64> for LeI64
impl MulAssign<i64> for LeI64
Source§fn mul_assign(&mut self, rhs: i64)
fn mul_assign(&mut self, rhs: i64)
Performs the
*= operation. Read moreSource§impl MulAssign for LeI64
impl MulAssign for LeI64
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for LeI64
impl Ord for LeI64
Source§impl PartialOrd<i64> for LeI64
impl PartialOrd<i64> for LeI64
Source§impl PartialOrd for LeI64
impl PartialOrd for LeI64
Source§impl RemAssign<i64> for LeI64
impl RemAssign<i64> for LeI64
Source§fn rem_assign(&mut self, rhs: i64)
fn rem_assign(&mut self, rhs: i64)
Performs the
%= operation. Read moreSource§impl RemAssign for LeI64
impl RemAssign for LeI64
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl SubAssign<i64> for LeI64
impl SubAssign<i64> for LeI64
Source§fn sub_assign(&mut self, rhs: i64)
fn sub_assign(&mut self, rhs: i64)
Performs the
-= operation. Read moreSource§impl SubAssign for LeI64
impl SubAssign for LeI64
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for LeI64
impl Eq for LeI64
impl Projectable for LeI64
impl StructuralPartialEq for LeI64
Auto Trait Implementations§
impl Freeze for LeI64
impl RefUnwindSafe for LeI64
impl Send for LeI64
impl Sync for LeI64
impl Unpin for LeI64
impl UnsafeUnpin for LeI64
impl UnwindSafe for LeI64
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