pub struct WrappingU64Instant<const BITS: u32 = 64>(/* private fields */);Expand description
An instant in a WrappingU64Time domain.
Implementations§
Source§impl<const BITS: u32> WrappingU64Instant<BITS>
impl<const BITS: u32> WrappingU64Instant<BITS>
Sourcepub fn wrapping_new(x: u64) -> Self
pub fn wrapping_new(x: u64) -> Self
Construct an instant from an arbitrary u64 value.
The provided value may be greater than 2^BITS.
The instant will behave as if the top bits had been masked off.
When and how this masking is performed is unspecified.
Sourcepub fn to_ticks(self) -> u64
pub fn to_ticks(self) -> u64
Convert to a tick count in the range 0..2^BITS.
If BITS<64, this type may use additional bits for extra precision.
The rounding behaviour of to_ticks is unspecified.
Trait Implementations§
Source§impl<const BITS: u32> Clone for WrappingU64Instant<BITS>
impl<const BITS: u32> Clone for WrappingU64Instant<BITS>
impl<const BITS: u32> Copy for WrappingU64Instant<BITS>
Source§impl<const BITS: u32> Debug for WrappingU64Instant<BITS>
impl<const BITS: u32> Debug for WrappingU64Instant<BITS>
impl<const BITS: u32> Eq for WrappingU64Instant<BITS>
Source§impl<const BITS: u32> Hash for WrappingU64Instant<BITS>
impl<const BITS: u32> Hash for WrappingU64Instant<BITS>
Source§impl<const BITS: u32> PartialEq for WrappingU64Instant<BITS>
impl<const BITS: u32> PartialEq for WrappingU64Instant<BITS>
impl<const BITS: u32> StructuralPartialEq for WrappingU64Instant<BITS>
Auto Trait Implementations§
impl<const BITS: u32> Freeze for WrappingU64Instant<BITS>
impl<const BITS: u32> RefUnwindSafe for WrappingU64Instant<BITS>
impl<const BITS: u32> Send for WrappingU64Instant<BITS>
impl<const BITS: u32> Sync for WrappingU64Instant<BITS>
impl<const BITS: u32> Unpin for WrappingU64Instant<BITS>
impl<const BITS: u32> UnsafeUnpin for WrappingU64Instant<BITS>
impl<const BITS: u32> UnwindSafe for WrappingU64Instant<BITS>
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