[−][src]Struct casper_node::types::Timestamp
A timestamp type, representing a concrete moment in time.
Implementations
impl Timestamp[src]
pub fn now() -> Self[src]
Returns the timestamp of the current moment
pub fn elapsed(&self) -> TimeDiff[src]
Returns the time that has elapsed since this timestamp
pub fn zero() -> Self[src]
Returns a zero timestamp
pub fn millis(&self) -> u64[src]
Returns the timestamp as the number of milliseconds since the Unix epoch
pub fn saturating_sub(self, other: Timestamp) -> TimeDiff[src]
Returns the difference between self and other, or 0 if self is earlier than other.
pub fn trailing_zeros(&self) -> u8[src]
Returns the number of trailing zeros in the number of milliseconds since the epoch.
Trait Implementations
impl Add<TimeDiff> for Timestamp[src]
type Output = Timestamp
The resulting type after applying the + operator.
pub fn add(self, diff: TimeDiff) -> Timestamp[src]
impl AddAssign<TimeDiff> for Timestamp[src]
pub fn add_assign(&mut self, rhs: TimeDiff)[src]
impl Clone for Timestamp[src]
impl Copy for Timestamp[src]
impl DataSize for Timestamp[src]
pub const IS_DYNAMIC: bool[src]
pub const STATIC_HEAP_SIZE: usize[src]
pub fn estimate_heap_size(&self) -> usize[src]
impl Debug for Timestamp[src]
impl<'de> Deserialize<'de> for Timestamp[src]
pub fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<Self, D::Error>[src]
deserializer: D
) -> Result<Self, D::Error>
impl Display for Timestamp[src]
impl Div<TimeDiff> for Timestamp[src]
type Output = u64
The resulting type after applying the / operator.
pub fn div(self, rhs: TimeDiff) -> u64[src]
impl DocExample for Timestamp[src]
pub fn doc_example() -> &'static Self[src]
impl Eq for Timestamp[src]
impl FromBytes for Timestamp[src]
pub fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), Error>[src]
pub fn from_vec(
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>[src]
bytes: Vec<u8, Global>
) -> Result<(Self, Vec<u8, Global>), Error>
impl FromStr for Timestamp[src]
type Err = TimestampError
The associated error which can be returned from parsing.
pub fn from_str(value: &str) -> Result<Self, Self::Err>[src]
impl Hash for Timestamp[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl JsonSchema for Timestamp[src]
pub fn schema_name() -> String[src]
pub fn json_schema(gen: &mut SchemaGenerator) -> Schema[src]
pub fn is_referenceable() -> bool[src]
impl Ord for Timestamp[src]
pub fn cmp(&self, other: &Timestamp) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<Timestamp> for Timestamp[src]
impl PartialOrd<Timestamp> for Timestamp[src]
pub fn partial_cmp(&self, other: &Timestamp) -> Option<Ordering>[src]
pub fn lt(&self, other: &Timestamp) -> bool[src]
pub fn le(&self, other: &Timestamp) -> bool[src]
pub fn gt(&self, other: &Timestamp) -> bool[src]
pub fn ge(&self, other: &Timestamp) -> bool[src]
impl Rem<TimeDiff> for Timestamp[src]
type Output = TimeDiff
The resulting type after applying the % operator.
pub fn rem(self, diff: TimeDiff) -> TimeDiff[src]
impl Serialize for Timestamp[src]
impl<__RhsT> Shl<__RhsT> for Timestamp where
u64: Shl<__RhsT, Output = u64>, [src]
u64: Shl<__RhsT, Output = u64>,
type Output = Timestamp
The resulting type after applying the << operator.
pub fn shl(self, rhs: __RhsT) -> Timestamp[src]
impl<__RhsT> Shr<__RhsT> for Timestamp where
u64: Shr<__RhsT, Output = u64>, [src]
u64: Shr<__RhsT, Output = u64>,
type Output = Timestamp
The resulting type after applying the >> operator.
pub fn shr(self, rhs: __RhsT) -> Timestamp[src]
impl StructuralEq for Timestamp[src]
impl StructuralPartialEq for Timestamp[src]
impl Sub<TimeDiff> for Timestamp[src]
type Output = Timestamp
The resulting type after applying the - operator.
pub fn sub(self, diff: TimeDiff) -> Timestamp[src]
impl Sub<Timestamp> for Timestamp[src]
type Output = TimeDiff
The resulting type after applying the - operator.
pub fn sub(self, other: Timestamp) -> TimeDiff[src]
impl ToBytes for Timestamp[src]
Auto Trait Implementations
impl RefUnwindSafe for Timestamp[src]
impl Send for Timestamp[src]
impl Sync for Timestamp[src]
impl Unpin for Timestamp[src]
impl UnwindSafe for Timestamp[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> CallHasher for T where
T: Hash,
T: Hash,
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> DynClone for T where
T: Clone, [src]
T: Clone,
pub fn __clone_box(&self, Private) -> *mut ()[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized, [src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> RuleType for T where
T: Eq + Ord + Copy + Debug + Hash, [src]
T: Eq + Ord + Copy + Debug + Hash,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Serialize for T where
T: Serialize + ?Sized, [src]
T: Serialize + ?Sized,
pub fn erased_serialize(
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>[src]
&self,
serializer: &mut dyn Serializer
) -> Result<Ok, Error>
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> WithSubscriber for T[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>, [src]
S: Into<Dispatch>,