pub struct MillisecondPeriod(/* private fields */);Expand description
A period measured in milliseconds which must be non-zero.
Implementations§
Source§impl MillisecondPeriod
impl MillisecondPeriod
Sourcepub const fn from_non_zero(millis: u64) -> Self
pub const fn from_non_zero(millis: u64) -> Self
Try to create the MillisecondPeriod from millisecond units.
§Panics:
If millis is zero, the contract was violated.
Sourcepub const fn from_non_zero_secs(seconds: u64) -> Self
pub const fn from_non_zero_secs(seconds: u64) -> Self
Try to create the MillisecondPeriod from seconds.
§Panics:
Because this is used in a const context, it is not yet possible to do Option::unwrap and thus
it is asserted that seconds is non-zero
Trait Implementations§
Source§impl Clone for MillisecondPeriod
impl Clone for MillisecondPeriod
Source§fn clone(&self) -> MillisecondPeriod
fn clone(&self) -> MillisecondPeriod
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MillisecondPeriod
impl Debug for MillisecondPeriod
Source§impl Ord for MillisecondPeriod
impl Ord for MillisecondPeriod
Source§fn cmp(&self, other: &MillisecondPeriod) -> Ordering
fn cmp(&self, other: &MillisecondPeriod) -> Ordering
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 PartialEq for MillisecondPeriod
impl PartialEq for MillisecondPeriod
Source§impl PartialOrd for MillisecondPeriod
impl PartialOrd for MillisecondPeriod
impl Copy for MillisecondPeriod
impl Eq for MillisecondPeriod
impl StructuralPartialEq for MillisecondPeriod
Auto Trait Implementations§
impl Freeze for MillisecondPeriod
impl RefUnwindSafe for MillisecondPeriod
impl Send for MillisecondPeriod
impl Sync for MillisecondPeriod
impl Unpin for MillisecondPeriod
impl UnwindSafe for MillisecondPeriod
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