[−][src]Struct utctimestamp::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.
fn add(self, rhs: TimeDelta) -> Self::Output
[src]
impl Add<TimeDelta> for TimeDelta
[src]
type Output = TimeDelta
The resulting type after applying the +
operator.
fn add(self, rhs: TimeDelta) -> Self::Output
[src]
impl AddAssign<TimeDelta> for UtcTimeStamp
[src]
fn add_assign(&mut self, rhs: TimeDelta)
[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.
fn div(self, rhs: TimeDelta) -> Self::Output
[src]
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.
fn div(self, rhs: i64) -> Self::Output
[src]
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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.
fn mul(self, rhs: i64) -> Self::Output
[src]
impl Ord for TimeDelta
[src]
fn cmp(&self, other: &TimeDelta) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<TimeDelta> for TimeDelta
[src]
impl PartialOrd<TimeDelta> for TimeDelta
[src]
fn partial_cmp(&self, other: &TimeDelta) -> Option<Ordering>
[src]
fn lt(&self, other: &TimeDelta) -> bool
[src]
fn le(&self, other: &TimeDelta) -> bool
[src]
fn gt(&self, other: &TimeDelta) -> bool
[src]
fn ge(&self, other: &TimeDelta) -> bool
[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.
fn rem(self, rhs: TimeDelta) -> Self::Output
[src]
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.
fn sub(self, rhs: TimeDelta) -> Self::Output
[src]
impl Sub<TimeDelta> for TimeDelta
[src]
type Output = TimeDelta
The resulting type after applying the -
operator.
fn sub(self, rhs: TimeDelta) -> Self::Output
[src]
impl SubAssign<TimeDelta> for UtcTimeStamp
[src]
fn sub_assign(&mut self, rhs: TimeDelta)
[src]
Auto Trait Implementations
impl RefUnwindSafe for TimeDelta
impl Send for TimeDelta
impl Sync for TimeDelta
impl Unpin for TimeDelta
impl UnwindSafe for TimeDelta
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>,