Struct mysql_async::time::Duration [−][src]
pub struct Duration { /* fields omitted */ }ISO 8601 time duration with nanosecond precision. This also allows for the negative duration; see individual methods for details.
Methods
impl Duration[src]
impl Durationpub fn weeks(weeks: i64) -> Duration[src]
pub fn weeks(weeks: i64) -> DurationMakes a new Duration with given number of weeks.
Equivalent to Duration::seconds(weeks * 7 * 24 * 60 * 60) with overflow checks.
Panics when the duration is out of bounds.
pub fn days(days: i64) -> Duration[src]
pub fn days(days: i64) -> DurationMakes a new Duration with given number of days.
Equivalent to Duration::seconds(days * 24 * 60 * 60) with overflow checks.
Panics when the duration is out of bounds.
pub fn hours(hours: i64) -> Duration[src]
pub fn hours(hours: i64) -> DurationMakes a new Duration with given number of hours.
Equivalent to Duration::seconds(hours * 60 * 60) with overflow checks.
Panics when the duration is out of bounds.
pub fn minutes(minutes: i64) -> Duration[src]
pub fn minutes(minutes: i64) -> DurationMakes a new Duration with given number of minutes.
Equivalent to Duration::seconds(minutes * 60) with overflow checks.
Panics when the duration is out of bounds.
pub fn seconds(seconds: i64) -> Duration[src]
pub fn seconds(seconds: i64) -> DurationMakes a new Duration with given number of seconds.
Panics when the duration is more than i64::MAX milliseconds
or less than i64::MIN milliseconds.
pub fn milliseconds(milliseconds: i64) -> Duration[src]
pub fn milliseconds(milliseconds: i64) -> DurationMakes a new Duration with given number of milliseconds.
pub fn microseconds(microseconds: i64) -> Duration[src]
pub fn microseconds(microseconds: i64) -> DurationMakes a new Duration with given number of microseconds.
pub fn nanoseconds(nanos: i64) -> Duration[src]
pub fn nanoseconds(nanos: i64) -> DurationMakes a new Duration with given number of nanoseconds.
pub fn span<F>(f: F) -> Duration where
F: FnOnce(), [src]
pub fn span<F>(f: F) -> Duration where
F: FnOnce(), Runs a closure, returning the duration of time it took to run the closure.
pub fn num_weeks(&self) -> i64[src]
pub fn num_weeks(&self) -> i64Returns the total number of whole weeks in the duration.
pub fn num_days(&self) -> i64[src]
pub fn num_days(&self) -> i64Returns the total number of whole days in the duration.
pub fn num_hours(&self) -> i64[src]
pub fn num_hours(&self) -> i64Returns the total number of whole hours in the duration.
pub fn num_minutes(&self) -> i64[src]
pub fn num_minutes(&self) -> i64Returns the total number of whole minutes in the duration.
pub fn num_seconds(&self) -> i64[src]
pub fn num_seconds(&self) -> i64Returns the total number of whole seconds in the duration.
pub fn num_milliseconds(&self) -> i64[src]
pub fn num_milliseconds(&self) -> i64Returns the total number of whole milliseconds in the duration,
pub fn num_microseconds(&self) -> Option<i64>[src]
pub fn num_microseconds(&self) -> Option<i64>Returns the total number of whole microseconds in the duration,
or None on overflow (exceeding 263 microseconds in either direction).
pub fn num_nanoseconds(&self) -> Option<i64>[src]
pub fn num_nanoseconds(&self) -> Option<i64>Returns the total number of whole nanoseconds in the duration,
or None on overflow (exceeding 263 nanoseconds in either direction).
pub fn checked_add(&self, rhs: &Duration) -> Option<Duration>[src]
pub fn checked_add(&self, rhs: &Duration) -> Option<Duration>Add two durations, returning None if overflow occurred.
pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration>[src]
pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration>Subtract two durations, returning None if overflow occurred.
pub fn min_value() -> Duration[src]
pub fn min_value() -> DurationThe minimum possible Duration: i64::MIN milliseconds.
pub fn max_value() -> Duration[src]
pub fn max_value() -> DurationThe maximum possible Duration: i64::MAX milliseconds.
pub fn zero() -> Duration[src]
pub fn zero() -> DurationA duration where the stored seconds and nanoseconds are equal to zero.
pub fn is_zero(&self) -> bool[src]
pub fn is_zero(&self) -> boolReturns true if the duration equals Duration::zero().
pub fn from_std(duration: Duration) -> Result<Duration, OutOfRangeError>[src]
pub fn from_std(duration: Duration) -> Result<Duration, OutOfRangeError>Creates a time::Duration object from std::time::Duration
This function errors when original duration is larger than the maximum value supported for this type.
pub fn to_std(&self) -> Result<Duration, OutOfRangeError>[src]
pub fn to_std(&self) -> Result<Duration, OutOfRangeError>Creates a std::time::Duration object from time::Duration
This function errors when duration is less than zero. As standard library implementation is limited to non-negative values.
Trait Implementations
impl FromValue for Duration[src]
impl FromValue for Durationtype Intermediate = ParseIr<Duration>
fn from_value(v: Value) -> Duration[src]
fn from_value(v: Value) -> DurationWill panic if could not convert v to Self.
fn from_value_opt(v: Value) -> Result<Self, FromValueError>[src]
fn from_value_opt(v: Value) -> Result<Self, FromValueError>Will return Err(Error::FromValueError(v)) if could not convert v to Self.
fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>[src]
fn get_intermediate(v: Value) -> Result<Self::Intermediate, FromValueError>Will return Err(Error::FromValueError(v)) if v is not convertible to Self.
impl From<Duration> for Value[src]
impl From<Duration> for Valueimpl ConvIr<Duration> for ParseIr<Duration>[src]
impl ConvIr<Duration> for ParseIr<Duration>fn new(v: Value) -> Result<ParseIr<Duration>, FromValueError>[src]
fn new(v: Value) -> Result<ParseIr<Duration>, FromValueError>fn commit(self) -> Duration[src]
fn commit(self) -> Durationfn rollback(self) -> Value[src]
fn rollback(self) -> Valueimpl Add<Duration> for NaiveDateTime[src]
impl Add<Duration> for NaiveDateTimeAn addition of Duration to NaiveDateTime yields another NaiveDateTime.
As a part of Chrono's leap second handling,
the addition assumes that there is no leap second ever,
except when the NaiveDateTime itself represents a leap second
in which case the assumption becomes that there is exactly a single leap second ever.
Panics on underflow or overflow.
Use NaiveDateTime::checked_add_signed to detect that.
Example
use chrono::NaiveDate; use time::Duration; let from_ymd = NaiveDate::from_ymd; let d = from_ymd(2016, 7, 8); let hms = |h, m, s| d.and_hms(h, m, s); assert_eq!(hms(3, 5, 7) + Duration::zero(), hms(3, 5, 7)); assert_eq!(hms(3, 5, 7) + Duration::seconds(1), hms(3, 5, 8)); assert_eq!(hms(3, 5, 7) + Duration::seconds(-1), hms(3, 5, 6)); assert_eq!(hms(3, 5, 7) + Duration::seconds(3600 + 60), hms(4, 6, 7)); assert_eq!(hms(3, 5, 7) + Duration::seconds(86_400), from_ymd(2016, 7, 9).and_hms(3, 5, 7)); assert_eq!(hms(3, 5, 7) + Duration::days(365), from_ymd(2017, 7, 8).and_hms(3, 5, 7)); let hmsm = |h, m, s, milli| d.and_hms_milli(h, m, s, milli); assert_eq!(hmsm(3, 5, 7, 980) + Duration::milliseconds(450), hmsm(3, 5, 8, 430));
Leap seconds are handled, but the addition assumes that it is the only leap second happened.
let leap = hmsm(3, 5, 59, 1_300); assert_eq!(leap + Duration::zero(), hmsm(3, 5, 59, 1_300)); assert_eq!(leap + Duration::milliseconds(-500), hmsm(3, 5, 59, 800)); assert_eq!(leap + Duration::milliseconds(500), hmsm(3, 5, 59, 1_800)); assert_eq!(leap + Duration::milliseconds(800), hmsm(3, 6, 0, 100)); assert_eq!(leap + Duration::seconds(10), hmsm(3, 6, 9, 300)); assert_eq!(leap + Duration::seconds(-10), hmsm(3, 5, 50, 300)); assert_eq!(leap + Duration::days(1), from_ymd(2016, 7, 9).and_hms_milli(3, 5, 59, 300));
type Output = NaiveDateTime
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> NaiveDateTime[src]
fn add(self, rhs: Duration) -> NaiveDateTimePerforms the + operation.
impl Add<Duration> for NaiveDate[src]
impl Add<Duration> for NaiveDateAn addition of Duration to NaiveDate discards the fractional days,
rounding to the closest integral number of days towards Duration::zero().
Panics on underflow or overflow.
Use NaiveDate::checked_add_signed to detect that.
Example
use chrono::NaiveDate; use time::Duration; let from_ymd = NaiveDate::from_ymd; assert_eq!(from_ymd(2014, 1, 1) + Duration::zero(), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) + Duration::seconds(86399), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) + Duration::seconds(-86399), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) + Duration::days(1), from_ymd(2014, 1, 2)); assert_eq!(from_ymd(2014, 1, 1) + Duration::days(-1), from_ymd(2013, 12, 31)); assert_eq!(from_ymd(2014, 1, 1) + Duration::days(364), from_ymd(2014, 12, 31)); assert_eq!(from_ymd(2014, 1, 1) + Duration::days(365*4 + 1), from_ymd(2018, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) + Duration::days(365*400 + 97), from_ymd(2414, 1, 1));
type Output = NaiveDate
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> NaiveDate[src]
fn add(self, rhs: Duration) -> NaiveDatePerforms the + operation.
impl Add<Duration> for NaiveTime[src]
impl Add<Duration> for NaiveTimeAn addition of Duration to NaiveTime wraps around and never overflows or underflows.
In particular the addition ignores integral number of days.
As a part of Chrono's leap second handling,
the addition assumes that there is no leap second ever,
except when the NaiveTime itself represents a leap second
in which case the assumption becomes that there is exactly a single leap second ever.
Example
use chrono::NaiveTime; use time::Duration; let from_hmsm = NaiveTime::from_hms_milli; assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::zero(), from_hmsm(3, 5, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(1), from_hmsm(3, 5, 8, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(-1), from_hmsm(3, 5, 6, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(60 + 4), from_hmsm(3, 6, 11, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(7*60*60 - 6*60), from_hmsm(9, 59, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::milliseconds(80), from_hmsm(3, 5, 7, 80)); assert_eq!(from_hmsm(3, 5, 7, 950) + Duration::milliseconds(280), from_hmsm(3, 5, 8, 230)); assert_eq!(from_hmsm(3, 5, 7, 950) + Duration::milliseconds(-980), from_hmsm(3, 5, 6, 970));
The addition wraps around.
assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(22*60*60), from_hmsm(1, 5, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::seconds(-8*60*60), from_hmsm(19, 5, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) + Duration::days(800), from_hmsm(3, 5, 7, 0));
Leap seconds are handled, but the addition assumes that it is the only leap second happened.
let leap = from_hmsm(3, 5, 59, 1_300); assert_eq!(leap + Duration::zero(), from_hmsm(3, 5, 59, 1_300)); assert_eq!(leap + Duration::milliseconds(-500), from_hmsm(3, 5, 59, 800)); assert_eq!(leap + Duration::milliseconds(500), from_hmsm(3, 5, 59, 1_800)); assert_eq!(leap + Duration::milliseconds(800), from_hmsm(3, 6, 0, 100)); assert_eq!(leap + Duration::seconds(10), from_hmsm(3, 6, 9, 300)); assert_eq!(leap + Duration::seconds(-10), from_hmsm(3, 5, 50, 300)); assert_eq!(leap + Duration::days(1), from_hmsm(3, 5, 59, 300));
type Output = NaiveTime
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> NaiveTime[src]
fn add(self, rhs: Duration) -> NaiveTimePerforms the + operation.
impl<Tz> Add<Duration> for Date<Tz> where
Tz: TimeZone, [src]
impl<Tz> Add<Duration> for Date<Tz> where
Tz: TimeZone, type Output = Date<Tz>
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> Date<Tz>[src]
fn add(self, rhs: Duration) -> Date<Tz>Performs the + operation.
impl<Tz> Add<Duration> for DateTime<Tz> where
Tz: TimeZone, [src]
impl<Tz> Add<Duration> for DateTime<Tz> where
Tz: TimeZone, type Output = DateTime<Tz>
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> DateTime<Tz>[src]
fn add(self, rhs: Duration) -> DateTime<Tz>Performs the + operation.
impl<Tz> Sub<Duration> for DateTime<Tz> where
Tz: TimeZone, [src]
impl<Tz> Sub<Duration> for DateTime<Tz> where
Tz: TimeZone, type Output = DateTime<Tz>
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> DateTime<Tz>[src]
fn sub(self, rhs: Duration) -> DateTime<Tz>Performs the - operation.
impl Sub<Duration> for NaiveDateTime[src]
impl Sub<Duration> for NaiveDateTimeA subtraction of Duration from NaiveDateTime yields another NaiveDateTime.
It is same to the addition with a negated Duration.
As a part of Chrono's leap second handling,
the addition assumes that there is no leap second ever,
except when the NaiveDateTime itself represents a leap second
in which case the assumption becomes that there is exactly a single leap second ever.
Panics on underflow or overflow.
Use NaiveDateTime::checked_sub_signed to detect that.
Example
use chrono::NaiveDate; use time::Duration; let from_ymd = NaiveDate::from_ymd; let d = from_ymd(2016, 7, 8); let hms = |h, m, s| d.and_hms(h, m, s); assert_eq!(hms(3, 5, 7) - Duration::zero(), hms(3, 5, 7)); assert_eq!(hms(3, 5, 7) - Duration::seconds(1), hms(3, 5, 6)); assert_eq!(hms(3, 5, 7) - Duration::seconds(-1), hms(3, 5, 8)); assert_eq!(hms(3, 5, 7) - Duration::seconds(3600 + 60), hms(2, 4, 7)); assert_eq!(hms(3, 5, 7) - Duration::seconds(86_400), from_ymd(2016, 7, 7).and_hms(3, 5, 7)); assert_eq!(hms(3, 5, 7) - Duration::days(365), from_ymd(2015, 7, 9).and_hms(3, 5, 7)); let hmsm = |h, m, s, milli| d.and_hms_milli(h, m, s, milli); assert_eq!(hmsm(3, 5, 7, 450) - Duration::milliseconds(670), hmsm(3, 5, 6, 780));
Leap seconds are handled, but the subtraction assumes that it is the only leap second happened.
let leap = hmsm(3, 5, 59, 1_300); assert_eq!(leap - Duration::zero(), hmsm(3, 5, 59, 1_300)); assert_eq!(leap - Duration::milliseconds(200), hmsm(3, 5, 59, 1_100)); assert_eq!(leap - Duration::milliseconds(500), hmsm(3, 5, 59, 800)); assert_eq!(leap - Duration::seconds(60), hmsm(3, 5, 0, 300)); assert_eq!(leap - Duration::days(1), from_ymd(2016, 7, 7).and_hms_milli(3, 6, 0, 300));
type Output = NaiveDateTime
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> NaiveDateTime[src]
fn sub(self, rhs: Duration) -> NaiveDateTimePerforms the - operation.
impl<Tz> Sub<Duration> for Date<Tz> where
Tz: TimeZone, [src]
impl<Tz> Sub<Duration> for Date<Tz> where
Tz: TimeZone, type Output = Date<Tz>
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> Date<Tz>[src]
fn sub(self, rhs: Duration) -> Date<Tz>Performs the - operation.
impl Sub<Duration> for NaiveDate[src]
impl Sub<Duration> for NaiveDateA subtraction of Duration from NaiveDate discards the fractional days,
rounding to the closest integral number of days towards Duration::zero().
It is same to the addition with a negated Duration.
Panics on underflow or overflow.
Use NaiveDate::checked_sub_signed to detect that.
Example
use chrono::NaiveDate; use time::Duration; let from_ymd = NaiveDate::from_ymd; assert_eq!(from_ymd(2014, 1, 1) - Duration::zero(), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) - Duration::seconds(86399), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) - Duration::seconds(-86399), from_ymd(2014, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) - Duration::days(1), from_ymd(2013, 12, 31)); assert_eq!(from_ymd(2014, 1, 1) - Duration::days(-1), from_ymd(2014, 1, 2)); assert_eq!(from_ymd(2014, 1, 1) - Duration::days(364), from_ymd(2013, 1, 2)); assert_eq!(from_ymd(2014, 1, 1) - Duration::days(365*4 + 1), from_ymd(2010, 1, 1)); assert_eq!(from_ymd(2014, 1, 1) - Duration::days(365*400 + 97), from_ymd(1614, 1, 1));
type Output = NaiveDate
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> NaiveDate[src]
fn sub(self, rhs: Duration) -> NaiveDatePerforms the - operation.
impl Sub<Duration> for NaiveTime[src]
impl Sub<Duration> for NaiveTimeA subtraction of Duration from NaiveTime wraps around and never overflows or underflows.
In particular the addition ignores integral number of days.
It is same to the addition with a negated Duration.
As a part of Chrono's leap second handling,
the addition assumes that there is no leap second ever,
except when the NaiveTime itself represents a leap second
in which case the assumption becomes that there is exactly a single leap second ever.
Example
use chrono::NaiveTime; use time::Duration; let from_hmsm = NaiveTime::from_hms_milli; assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::zero(), from_hmsm(3, 5, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::seconds(1), from_hmsm(3, 5, 6, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::seconds(60 + 5), from_hmsm(3, 4, 2, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::seconds(2*60*60 + 6*60), from_hmsm(0, 59, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::milliseconds(80), from_hmsm(3, 5, 6, 920)); assert_eq!(from_hmsm(3, 5, 7, 950) - Duration::milliseconds(280), from_hmsm(3, 5, 7, 670));
The subtraction wraps around.
assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::seconds(8*60*60), from_hmsm(19, 5, 7, 0)); assert_eq!(from_hmsm(3, 5, 7, 0) - Duration::days(800), from_hmsm(3, 5, 7, 0));
Leap seconds are handled, but the subtraction assumes that it is the only leap second happened.
let leap = from_hmsm(3, 5, 59, 1_300); assert_eq!(leap - Duration::zero(), from_hmsm(3, 5, 59, 1_300)); assert_eq!(leap - Duration::milliseconds(200), from_hmsm(3, 5, 59, 1_100)); assert_eq!(leap - Duration::milliseconds(500), from_hmsm(3, 5, 59, 800)); assert_eq!(leap - Duration::seconds(60), from_hmsm(3, 5, 0, 300)); assert_eq!(leap - Duration::days(1), from_hmsm(3, 6, 0, 300));
type Output = NaiveTime
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> NaiveTime[src]
fn sub(self, rhs: Duration) -> NaiveTimePerforms the - operation.
impl SubAssign<Duration> for NaiveDateTime[src]
impl SubAssign<Duration> for NaiveDateTimefn sub_assign(&mut self, rhs: Duration)[src]
fn sub_assign(&mut self, rhs: Duration)Performs the -= operation.
impl SubAssign<Duration> for NaiveTime[src]
impl SubAssign<Duration> for NaiveTimefn sub_assign(&mut self, rhs: Duration)[src]
fn sub_assign(&mut self, rhs: Duration)Performs the -= operation.
impl SubAssign<Duration> for NaiveDate[src]
impl SubAssign<Duration> for NaiveDatefn sub_assign(&mut self, rhs: Duration)[src]
fn sub_assign(&mut self, rhs: Duration)Performs the -= operation.
impl AddAssign<Duration> for NaiveTime[src]
impl AddAssign<Duration> for NaiveTimefn add_assign(&mut self, rhs: Duration)[src]
fn add_assign(&mut self, rhs: Duration)Performs the += operation.
impl AddAssign<Duration> for NaiveDate[src]
impl AddAssign<Duration> for NaiveDatefn add_assign(&mut self, rhs: Duration)[src]
fn add_assign(&mut self, rhs: Duration)Performs the += operation.
impl AddAssign<Duration> for NaiveDateTime[src]
impl AddAssign<Duration> for NaiveDateTimefn add_assign(&mut self, rhs: Duration)[src]
fn add_assign(&mut self, rhs: Duration)Performs the += operation.
impl Add<Duration> for Duration[src]
impl Add<Duration> for Durationtype Output = Duration
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> Duration[src]
fn add(self, rhs: Duration) -> DurationPerforms the + operation.
impl Add<Duration> for Tm[src]
impl Add<Duration> for Tmtype Output = Tm
The resulting type after applying the + operator.
fn add(self, other: Duration) -> Tm[src]
fn add(self, other: Duration) -> TmThe resulting Tm is in UTC.
impl Add<Duration> for Timespec[src]
impl Add<Duration> for Timespectype Output = Timespec
The resulting type after applying the + operator.
fn add(self, other: Duration) -> Timespec[src]
fn add(self, other: Duration) -> TimespecPerforms the + operation.
impl Add<Duration> for SteadyTime[src]
impl Add<Duration> for SteadyTimetype Output = SteadyTime
The resulting type after applying the + operator.
fn add(self, other: Duration) -> SteadyTime[src]
fn add(self, other: Duration) -> SteadyTimePerforms the + operation.
impl PartialOrd<Duration> for Duration[src]
impl PartialOrd<Duration> for Durationfn partial_cmp(&self, other: &Duration) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &Duration) -> Option<Ordering>This method returns an ordering between self and other values if one exists. Read more
fn lt(&self, other: &Duration) -> bool[src]
fn lt(&self, other: &Duration) -> boolThis method tests less than (for self and other) and is used by the < operator. Read more
fn le(&self, other: &Duration) -> bool[src]
fn le(&self, other: &Duration) -> boolThis method tests less than or equal to (for self and other) and is used by the <= operator. Read more
fn gt(&self, other: &Duration) -> bool[src]
fn gt(&self, other: &Duration) -> boolThis method tests greater than (for self and other) and is used by the > operator. Read more
fn ge(&self, other: &Duration) -> bool[src]
fn ge(&self, other: &Duration) -> boolThis method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
impl Sub<Duration> for Timespec[src]
impl Sub<Duration> for Timespectype Output = Timespec
The resulting type after applying the - operator.
fn sub(self, other: Duration) -> Timespec[src]
fn sub(self, other: Duration) -> TimespecPerforms the - operation.
impl Sub<Duration> for Duration[src]
impl Sub<Duration> for Durationtype Output = Duration
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> Duration[src]
fn sub(self, rhs: Duration) -> DurationPerforms the - operation.
impl Sub<Duration> for Tm[src]
impl Sub<Duration> for Tmtype Output = Tm
The resulting type after applying the - operator.
fn sub(self, other: Duration) -> Tm[src]
fn sub(self, other: Duration) -> TmThe resulting Tm is in UTC.
impl Sub<Duration> for SteadyTime[src]
impl Sub<Duration> for SteadyTimetype Output = SteadyTime
The resulting type after applying the - operator.
fn sub(self, other: Duration) -> SteadyTime[src]
fn sub(self, other: Duration) -> SteadyTimePerforms the - operation.
impl Clone for Duration[src]
impl Clone for Durationfn clone(&self) -> Duration[src]
fn clone(&self) -> DurationReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Display for Duration[src]
impl Display for Durationfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Debug for Duration[src]
impl Debug for Durationfn fmt(&self, f: &mut Formatter) -> Result<(), Error>[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>Formats the value using the given formatter. Read more
impl Mul<i32> for Duration[src]
impl Mul<i32> for Durationtype Output = Duration
The resulting type after applying the * operator.
fn mul(self, rhs: i32) -> Duration[src]
fn mul(self, rhs: i32) -> DurationPerforms the * operation.
impl Copy for Duration[src]
impl Copy for Durationimpl Ord for Duration[src]
impl Ord for Durationfn cmp(&self, other: &Duration) -> Ordering[src]
fn cmp(&self, other: &Duration) -> OrderingThis method returns an Ordering between self and other. Read more
fn max(self, other: Self) -> Self1.21.0[src]
fn max(self, other: Self) -> SelfCompares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self1.21.0[src]
fn min(self, other: Self) -> SelfCompares and returns the minimum of two values. Read more
impl Eq for Duration[src]
impl Eq for Durationimpl Neg for Duration[src]
impl Neg for Durationtype Output = Duration
The resulting type after applying the - operator.
fn neg(self) -> Duration[src]
fn neg(self) -> DurationPerforms the unary - operation.
impl PartialEq<Duration> for Duration[src]
impl PartialEq<Duration> for Durationfn eq(&self, other: &Duration) -> bool[src]
fn eq(&self, other: &Duration) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Duration) -> bool[src]
fn ne(&self, other: &Duration) -> boolThis method tests for !=.
impl Div<i32> for Duration[src]
impl Div<i32> for Duration