Struct TimeArithmetic
struct TimeArithmetic { ... }
Options for Time::checked_add and Time::checked_sub.
This type provides a way to ergonomically add one of a few different
duration types to a Time.
The main way to construct values of this type is with its From trait
implementations:
From<Span> for TimeArithmeticadds (or subtracts) the given span to the receiver time.From<SignedDuration> for TimeArithmeticadds (or subtracts) the given signed duration to the receiver time.From<std::time::Duration> for TimeArithmeticadds (or subtracts) the given unsigned duration to the receiver time.
Example
use Duration;
use ;
let t = time;
assert_eq!;
assert_eq!;
assert_eq!;
# Ok::
Implementations
impl Clone for TimeArithmetic
fn clone(self: &Self) -> TimeArithmetic
impl Copy for TimeArithmetic
impl Debug for TimeArithmetic
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Freeze for TimeArithmetic
impl From for TimeArithmetic
fn from(span: Span) -> TimeArithmetic
impl From for TimeArithmetic
fn from(sdur: SignedDuration) -> TimeArithmetic
impl From for TimeArithmetic
fn from(udur: UnsignedDuration) -> TimeArithmetic
impl RefUnwindSafe for TimeArithmetic
impl Send for TimeArithmetic
impl Sync for TimeArithmetic
impl Unpin for TimeArithmetic
impl UnsafeUnpin for TimeArithmetic
impl UnwindSafe for TimeArithmetic
impl<'a> From for TimeArithmetic
fn from(span: &'a Span) -> TimeArithmetic
impl<'a> From for TimeArithmetic
fn from(sdur: &'a SignedDuration) -> TimeArithmetic
impl<'a> From for TimeArithmetic
fn from(udur: &'a UnsignedDuration) -> TimeArithmetic
impl<T> Any for TimeArithmetic
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for TimeArithmetic
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for TimeArithmetic
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for TimeArithmetic
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for TimeArithmetic
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TimeArithmetic
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for TimeArithmetic
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for TimeArithmetic
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for TimeArithmetic
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>