pub struct Timestamp<T = u128>(pub T);Tuple Fields§
§0: TImplementations§
Source§impl<T> Timestamp<T>
impl<T> Timestamp<T>
pub fn from_value(index: T) -> Timestamp<T>
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>(self, f: F) -> Timestamp<U>where
F: FnOnce(T) -> U,
pub fn map<U, F>(self, f: F) -> Timestamp<U>where
F: FnOnce(T) -> 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<'de, T> Deserialize<'de> for Timestamp<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Timestamp<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Timestamp<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Timestamp<T>, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. 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§impl<T> Ord for Timestamp<T>where
T: Ord,
impl<T> Ord for Timestamp<T>where
T: Ord,
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 for Timestamp<T>where
T: PartialOrd,
impl<T> PartialOrd for Timestamp<T>where
T: PartialOrd,
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<T> Serialize for Timestamp<T>where
T: Serialize,
impl<T> Serialize for Timestamp<T>where
T: Serialize,
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§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 for Timestamp<T>where
T: Copy,
impl<T> Eq for Timestamp<T>where
T: Eq,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<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.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<A, B, C> PyMod<B> for Awhere
A: Rem<B, Output = C>,
B: Copy + Zero + PartialOrd,
C: Add<B, Output = C> + Zero + PartialOrd,
impl<A, B, C> PyMod<B> for Awhere
A: Rem<B, Output = C>,
B: Copy + Zero + PartialOrd,
C: Add<B, Output = C> + Zero + PartialOrd,
Source§impl<R> Rng for R
impl<R> Rng for R
Source§fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn random<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
Return a random value via the
StandardUniform distribution. Read moreSource§fn random_iter<T>(self) -> Iter<StandardUniform, Self, T> ⓘ
fn random_iter<T>(self) -> Iter<StandardUniform, Self, T> ⓘ
Source§fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn random_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
Generate a random value in the given range. Read more
Source§fn random_bool(&mut self, p: f64) -> bool
fn random_bool(&mut self, p: f64) -> bool
Return a bool with a probability
p of being true. Read moreSource§fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
fn random_ratio(&mut self, numerator: u32, denominator: u32) -> bool
Return a bool with a probability of
numerator/denominator of being
true. Read moreSource§fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
fn sample<T, D>(&mut self, distr: D) -> Twhere
D: Distribution<T>,
Sample a new value, using the given distribution. Read more
Source§fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T> ⓘwhere
D: Distribution<T>,
Self: Sized,
fn sample_iter<T, D>(self, distr: D) -> Iter<D, Self, T> ⓘwhere
D: Distribution<T>,
Self: Sized,
Create an iterator that generates values using the given distribution. Read more
Source§fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
fn gen<T>(&mut self) -> Twhere
StandardUniform: Distribution<T>,
👎Deprecated since 0.9.0: Renamed to
random to avoid conflict with the new gen keyword in Rust 2024.Alias for
Rng::random.Source§fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
fn gen_range<T, R>(&mut self, range: R) -> Twhere
T: SampleUniform,
R: SampleRange<T>,
👎Deprecated since 0.9.0: Renamed to
random_rangeAlias for
Rng::random_range.Source§impl<R> TryRngCore for R
impl<R> TryRngCore for R
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a RNG error.
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
Return the next random
u32.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
Return the next random
u64.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
Fill
dest entirely with random data.Source§fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
fn unwrap_mut(&mut self) -> UnwrapMut<'_, Self>
Wrap RNG with the
UnwrapMut wrapper.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self>where
Self: Sized,
Convert an
RngCore to a RngReadAdapter.