Struct smoltcp::time::Duration [−][src]
A relative amount of time.
Fields
millis: u64
Implementations
impl Duration
[src]
pub const fn from_millis(millis: u64) -> Duration
[src]
Create a new Duration
from a number of milliseconds.
pub const fn from_secs(secs: u64) -> Duration
[src]
Create a new Instant
from a number of seconds.
pub const fn millis(&self) -> u64
[src]
The fractional number of milliseconds in this Duration
.
pub const fn secs(&self) -> u64
[src]
The number of whole seconds in this Duration
.
pub const fn total_millis(&self) -> u64
[src]
The total number of milliseconds in this Duration
.
Trait Implementations
impl Add<Duration> for Instant
[src]
type Output = Instant
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Instant
[src]
impl Add<Duration> for Duration
[src]
type Output = Duration
The resulting type after applying the +
operator.
fn add(self, rhs: Duration) -> Duration
[src]
impl AddAssign<Duration> for Instant
[src]
fn add_assign(&mut self, rhs: Duration)
[src]
impl AddAssign<Duration> for Duration
[src]
fn add_assign(&mut self, rhs: Duration)
[src]
impl Clone for Duration
[src]
impl Copy for Duration
[src]
impl Debug for Duration
[src]
impl Default for Duration
[src]
impl Display for Duration
[src]
impl Div<u32> for Duration
[src]
type Output = Duration
The resulting type after applying the /
operator.
fn div(self, rhs: u32) -> Duration
[src]
impl DivAssign<u32> for Duration
[src]
fn div_assign(&mut self, rhs: u32)
[src]
impl Eq for Duration
[src]
impl From<Duration> for Duration
[src]
impl Into<Duration> for Duration
[src]
impl Mul<u32> for Duration
[src]
type Output = Duration
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Duration
[src]
impl MulAssign<u32> for Duration
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
impl Ord for Duration
[src]
fn cmp(&self, other: &Duration) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Duration> for Duration
[src]
impl PartialOrd<Duration> for Duration
[src]
fn partial_cmp(&self, other: &Duration) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for Duration
[src]
impl StructuralPartialEq for Duration
[src]
impl Sub<Duration> for Instant
[src]
type Output = Instant
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Instant
[src]
impl Sub<Duration> for Duration
[src]
type Output = Duration
The resulting type after applying the -
operator.
fn sub(self, rhs: Duration) -> Duration
[src]
impl SubAssign<Duration> for Instant
[src]
fn sub_assign(&mut self, rhs: Duration)
[src]
impl SubAssign<Duration> for Duration
[src]
fn sub_assign(&mut self, rhs: Duration)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,