Struct time::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) -> <Millisecond as Per<T>>::Outputwhere
Millisecond: Per<T>,
T: Copy,
pub const fn per<T>(_larger: T) -> <Millisecond as Per<T>>::Outputwhere
Millisecond: Per<T>,
T: Copy,
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
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)