pub struct TimeSpan(pub i64);
Expand description
A value representing an interval of time, in microseconds.
Tuple Fields§
§0: i64
Implementations§
§impl TimeSpan
impl TimeSpan
pub fn from_microseconds(v: i64) -> TimeSpan
pub fn from_microseconds(v: i64) -> TimeSpan
Create a new timespan from microseconds.
pub fn from_milliseconds(v: i64) -> TimeSpan
pub fn from_milliseconds(v: i64) -> TimeSpan
Create a new timespan from milliseconds.
pub fn from_seconds(v: i64) -> TimeSpan
pub fn from_seconds(v: i64) -> TimeSpan
Create a new timespan from seconds.
pub fn from_minutes(v: i64) -> TimeSpan
pub fn from_minutes(v: i64) -> TimeSpan
Create a new timespan from minutes.
pub fn from_hours(v: i64) -> TimeSpan
pub fn from_hours(v: i64) -> TimeSpan
Create a new timespan from hours.
pub fn as_microseconds(self) -> i64
pub fn as_microseconds(self) -> i64
Return the full number of microseconds in this TimeSpan
.
pub fn as_milliseconds(self) -> i64
pub fn as_milliseconds(self) -> i64
Return the full number of milliseconds in this TimeSpan
.
pub fn as_seconds(self) -> i64
pub fn as_seconds(self) -> i64
Return the full number of seconds in this TimeSpan
.
pub fn as_minutes(self) -> i64
pub fn as_minutes(self) -> i64
Return the full number of minutes in this TimeSpan
.
Trait Implementations§
§impl Ord for TimeSpan
impl Ord for TimeSpan
§impl PartialOrd<TimeSpan> for TimeSpan
impl PartialOrd<TimeSpan> for TimeSpan
§fn partial_cmp(&self, other: &TimeSpan) -> Option<Ordering>
fn partial_cmp(&self, other: &TimeSpan) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for TimeSpan
impl Eq for TimeSpan
impl StructuralEq for TimeSpan
impl StructuralPartialEq for TimeSpan
Auto Trait Implementations§
impl RefUnwindSafe for TimeSpan
impl Send for TimeSpan
impl Sync for TimeSpan
impl Unpin for TimeSpan
impl UnwindSafe for TimeSpan
Blanket Implementations§
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.