pub struct Timestamp<T = Ts>(pub T);Tuple Fields§
§0: TImplementations§
Source§impl<T> Timestamp<T>
impl<T> Timestamp<T>
pub fn from_value(index: T) -> Self
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
returns a mutable pointer to the inner value
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
consumes the index returning the inner value
Sourcepub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Timestamp<U>
pub fn map<U, F: FnOnce(T) -> U>(self, f: F) -> Timestamp<U>
apply a function to the inner value and returns a new Timestamp wrapping the result
Trait Implementations§
Source§impl<A, B> AddAssign<B> for Timestamp<A>where
A: AddAssign<B>,
impl<A, B> AddAssign<B> for Timestamp<A>where
A: AddAssign<B>,
Source§fn add_assign(&mut self, rhs: B)
fn add_assign(&mut self, rhs: B)
Performs the
+= operation. Read moreSource§impl<A, B> BitAndAssign<B> for Timestamp<A>where
A: BitAndAssign<B>,
impl<A, B> BitAndAssign<B> for Timestamp<A>where
A: BitAndAssign<B>,
Source§fn bitand_assign(&mut self, rhs: B)
fn bitand_assign(&mut self, rhs: B)
Performs the
&= operation. Read moreSource§impl<A, B> BitOrAssign<B> for Timestamp<A>where
A: BitOrAssign<B>,
impl<A, B> BitOrAssign<B> for Timestamp<A>where
A: BitOrAssign<B>,
Source§fn bitor_assign(&mut self, rhs: B)
fn bitor_assign(&mut self, rhs: B)
Performs the
|= operation. Read moreSource§impl<A, B> BitXorAssign<B> for Timestamp<A>where
A: BitXorAssign<B>,
impl<A, B> BitXorAssign<B> for Timestamp<A>where
A: BitXorAssign<B>,
Source§fn bitxor_assign(&mut self, rhs: B)
fn bitxor_assign(&mut self, rhs: B)
Performs the
^= operation. Read moreSource§impl<T> BorrowMut<T> for Timestamp<T>
impl<T> BorrowMut<T> for Timestamp<T>
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<A, B> DivAssign<B> for Timestamp<A>where
A: DivAssign<B>,
impl<A, B> DivAssign<B> for Timestamp<A>where
A: DivAssign<B>,
Source§fn div_assign(&mut self, rhs: B)
fn div_assign(&mut self, rhs: B)
Performs the
/= operation. Read moreSource§impl<A, B> MulAssign<B> for Timestamp<A>where
A: MulAssign<B>,
impl<A, B> MulAssign<B> for Timestamp<A>where
A: MulAssign<B>,
Source§fn mul_assign(&mut self, rhs: B)
fn mul_assign(&mut self, rhs: B)
Performs the
*= operation. Read moreSource§impl<T> Num for Timestamp<T>where
T: Num,
impl<T> Num for Timestamp<T>where
T: Num,
type FromStrRadixErr = <T as Num>::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<T: Ord> Ord for Timestamp<T>
impl<T: Ord> Ord for Timestamp<T>
1.21.0 · Source§fn 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
Source§impl<T: PartialOrd> PartialOrd for Timestamp<T>
impl<T: PartialOrd> PartialOrd for Timestamp<T>
Source§impl<A, B> RemAssign<B> for Timestamp<A>where
A: RemAssign<B>,
impl<A, B> RemAssign<B> for Timestamp<A>where
A: RemAssign<B>,
Source§fn rem_assign(&mut self, rhs: B)
fn rem_assign(&mut self, rhs: B)
Performs the
%= operation. Read moreSource§impl<A, B> ShlAssign<B> for Timestamp<A>where
A: ShlAssign<B>,
impl<A, B> ShlAssign<B> for Timestamp<A>where
A: ShlAssign<B>,
Source§fn shl_assign(&mut self, rhs: B)
fn shl_assign(&mut self, rhs: B)
Performs the
<<= operation. Read moreSource§impl<A, B> ShrAssign<B> for Timestamp<A>where
A: ShrAssign<B>,
impl<A, B> ShrAssign<B> for Timestamp<A>where
A: ShrAssign<B>,
Source§fn shr_assign(&mut self, rhs: B)
fn shr_assign(&mut self, rhs: B)
Performs the
>>= operation. Read moreSource§impl<A, B> SubAssign<B> for Timestamp<A>where
A: SubAssign<B>,
impl<A, B> SubAssign<B> for Timestamp<A>where
A: SubAssign<B>,
Source§fn sub_assign(&mut self, rhs: B)
fn sub_assign(&mut self, rhs: B)
Performs the
-= operation. Read moreimpl<T: Copy> Copy for Timestamp<T>
impl<T: Eq> Eq for Timestamp<T>
impl<T> StructuralPartialEq for Timestamp<T>
Auto Trait Implementations§
impl<T> Freeze for Timestamp<T>where
T: Freeze,
impl<T> RefUnwindSafe for Timestamp<T>where
T: RefUnwindSafe,
impl<T> Send for Timestamp<T>where
T: Send,
impl<T> Sync for Timestamp<T>where
T: Sync,
impl<T> Unpin for Timestamp<T>where
T: Unpin,
impl<T> UnwindSafe for Timestamp<T>where
T: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DecrementAssign for T
impl<T> DecrementAssign for T
fn decrement_assign(&mut self)
Source§impl<T> DecrementMut for T
impl<T> DecrementMut for T
fn decrement_mut(&mut self)
Source§impl<T> IncrementAssign for T
impl<T> IncrementAssign for T
fn increment_assign(&mut self)
Source§impl<T> IncrementMut for T
impl<T> IncrementMut for T
fn increment_mut(&mut self)
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<A, B, C> PercentDifference<B> for A
impl<A, B, C> PercentDifference<B> for A
type Output = C
Source§fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
Computes the percent difference between two values.