pub struct PermitTimestamp(/* private fields */);Expand description
Caller-observed wall-clock timestamp in Unix seconds.
Implementations§
Source§impl PermitTimestamp
impl PermitTimestamp
Sourcepub const fn from_seconds(seconds: u64) -> Self
pub const fn from_seconds(seconds: u64) -> Self
Wraps caller-provided Unix seconds without acquiring a clock.
Sourcepub const fn as_seconds(self) -> u64
pub const fn as_seconds(self) -> u64
Returns Unix seconds.
Trait Implementations§
Source§impl Clone for PermitTimestamp
impl Clone for PermitTimestamp
Source§fn clone(&self) -> PermitTimestamp
fn clone(&self) -> PermitTimestamp
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PermitTimestamp
Source§impl Debug for PermitTimestamp
impl Debug for PermitTimestamp
impl Eq for PermitTimestamp
Source§impl Ord for PermitTimestamp
impl Ord for PermitTimestamp
Source§fn cmp(&self, other: &PermitTimestamp) -> Ordering
fn cmp(&self, other: &PermitTimestamp) -> Ordering
1.21.0 (const: unstable) · 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 PartialEq for PermitTimestamp
impl PartialEq for PermitTimestamp
Source§impl PartialOrd for PermitTimestamp
impl PartialOrd for PermitTimestamp
impl StructuralPartialEq for PermitTimestamp
Auto Trait Implementations§
impl Freeze for PermitTimestamp
impl RefUnwindSafe for PermitTimestamp
impl Send for PermitTimestamp
impl Sync for PermitTimestamp
impl Unpin for PermitTimestamp
impl UnsafeUnpin for PermitTimestamp
impl UnwindSafe for PermitTimestamp
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