[][src]Struct utctimestamp::TimeDelta

#[repr(transparent)]pub struct TimeDelta(_);

Millisecond precision time delta.

Implementations

impl TimeDelta[src]

Explicit conversion from and to i64.

pub const fn zero() -> Self[src]

pub const fn from_hours(int: i64) -> Self[src]

pub const fn from_minutes(int: i64) -> Self[src]

pub const fn from_seconds(int: i64) -> Self[src]

pub const fn from_milliseconds(int: i64) -> Self[src]

pub const fn as_milliseconds(self) -> i64[src]

pub const fn is_zero(self) -> bool[src]

Check whether the timedelta is 0.

pub const fn is_positive(self) -> bool[src]

Returns true if the timedelta is positive and false if it is zero or negative.

pub const fn is_negative(self) -> bool[src]

Returns true if the timedelta is negative and false if it is zero or positive.

Trait Implementations

impl Add<TimeDelta> for UtcTimeStamp[src]

Calculate the timestamp advanced by a timedelta.

type Output = UtcTimeStamp

The resulting type after applying the + operator.

impl Add<TimeDelta> for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the + operator.

impl AddAssign<TimeDelta> for UtcTimeStamp[src]

impl Clone for TimeDelta[src]

impl Copy for TimeDelta[src]

impl Debug for TimeDelta[src]

impl Display for TimeDelta[src]

Display timedelta using chrono.

impl Div<TimeDelta> for TimeDelta[src]

How many times does the timestamp fit into another?

type Output = i64

The resulting type after applying the / operator.

impl Div<i64> for TimeDelta[src]

Shorten the delta by a given factor. Integer div.

type Output = TimeDelta

The resulting type after applying the / operator.

impl Eq for TimeDelta[src]

impl From<Duration> for TimeDelta[src]

Create a simple timedelta from a chrono duration.

impl From<TimeDelta> for Duration[src]

Create a chrono duration from a simple timedelta.

impl Hash for TimeDelta[src]

impl Mul<i64> for TimeDelta[src]

Multiply the delta to be n times as long.

type Output = TimeDelta

The resulting type after applying the * operator.

impl Ord for TimeDelta[src]

impl PartialEq<TimeDelta> for TimeDelta[src]

impl PartialOrd<TimeDelta> for TimeDelta[src]

impl Rem<TimeDelta> for TimeDelta[src]

How far away is the delta from being aligned to another delta?

type Output = TimeDelta

The resulting type after applying the % operator.

impl StructuralEq for TimeDelta[src]

impl StructuralPartialEq for TimeDelta[src]

impl Sub<TimeDelta> for UtcTimeStamp[src]

Calculate the timestamp lessened by a timedelta.

type Output = UtcTimeStamp

The resulting type after applying the - operator.

impl Sub<TimeDelta> for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the - operator.

impl SubAssign<TimeDelta> for UtcTimeStamp[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.