Struct time_core::convert::Millisecond
source · pub struct Millisecond;
Expand description
A unit of time representing exactly one millisecond.
Implementations§
source§impl Millisecond
impl Millisecond
sourcepub const fn per<T>(_larger: T) -> <Self as Per<T>>::Output
pub const fn per<T>(_larger: T) -> <Self as Per<T>>::Output
Obtain the number of times Millisecond
can fit into T
.
If T
is smaller than Millisecond
, the code will fail to
compile. The return type is the smallest unsigned integer type that can represent
the value.
Valid calls:
Millisecond::per(Millisecond)
(returnsu8
)Millisecond::per(Second)
(returnsu16
)Millisecond::per(Minute)
(returnsu16
)Millisecond::per(Hour)
(returnsu32
)Millisecond::per(Day)
(returnsu32
)Millisecond::per(Week)
(returnsu32
)
Trait Implementations§
source§impl Clone for Millisecond
impl Clone for Millisecond
source§fn clone(&self) -> Millisecond
fn clone(&self) -> Millisecond
Returns a copy 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 Millisecond
impl Debug for Millisecond
source§impl Per<Day> for Millisecond
impl Per<Day> for Millisecond
source§impl Per<Hour> for Millisecond
impl Per<Hour> for Millisecond
source§impl Per<Millisecond> for Microsecond
impl Per<Millisecond> for Microsecond
source§impl Per<Millisecond> for Millisecond
impl Per<Millisecond> for Millisecond
source§impl Per<Millisecond> for Nanosecond
impl Per<Millisecond> for Nanosecond
source§impl Per<Minute> for Millisecond
impl Per<Minute> for Millisecond
source§impl Per<Second> for Millisecond
impl Per<Second> for Millisecond
source§impl Per<Week> for Millisecond
impl Per<Week> for Millisecond
impl Copy for Millisecond
Auto Trait Implementations§
impl Freeze for Millisecond
impl RefUnwindSafe for Millisecond
impl Send for Millisecond
impl Sync for Millisecond
impl Unpin for Millisecond
impl UnwindSafe for Millisecond
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