Struct mitrid_core::utils::timestamp::timestamp_diff::TimestampDiff [−][src]
pub struct TimestampDiff(_);
Type representing the difference between two Timestamp
s.
Methods
impl TimestampDiff
[src]
impl TimestampDiff
pub fn new(tmdiff: i64) -> TimestampDiff
[src]
pub fn new(tmdiff: i64) -> TimestampDiff
Creates a new TimestampDiff
.
pub fn from_i64(tmdiff: i64) -> TimestampDiff
[src]
pub fn from_i64(tmdiff: i64) -> TimestampDiff
Creates a new TimestampDiff
from i64
.
pub fn from_u64(tmdiff: u64) -> TimestampDiff
[src]
pub fn from_u64(tmdiff: u64) -> TimestampDiff
Creates a new TimestampDiff
from u64
.
pub fn from_duration(dur: Duration) -> TimestampDiff
[src]
pub fn from_duration(dur: Duration) -> TimestampDiff
Creates a new TimestampDiff
from a Duration
.
pub fn from_millis(millis: u64) -> TimestampDiff
[src]
pub fn from_millis(millis: u64) -> TimestampDiff
Creates a new TimestampDiff
from milliseconds.
pub fn from_secs(secs: u64) -> TimestampDiff
[src]
pub fn from_secs(secs: u64) -> TimestampDiff
Creates a new TimestampDiff
from seconds.
pub fn as_i64(&self) -> i64
[src]
pub fn as_i64(&self) -> i64
Converts the TimestampDiff
to i64
.
pub fn abs(&self) -> u64
[src]
pub fn abs(&self) -> u64
Converts the TimestampDiff
to its absolute representation.
pub fn as_u64(&self) -> u64
[src]
pub fn as_u64(&self) -> u64
Converts the TimestampDiff
to u64
.
pub fn as_duration(&self) -> Duration
[src]
pub fn as_duration(&self) -> Duration
Converts the TimestampDiff
to a Duration
.
pub fn as_millis(&self) -> u64
[src]
pub fn as_millis(&self) -> u64
Converts the TimestampDiff
to milliseconds.
pub fn as_secs(&self) -> u64
[src]
pub fn as_secs(&self) -> u64
Converts the TimestampDiff
to seconds.
pub fn sign(&self) -> i64
[src]
pub fn sign(&self) -> i64
Returns the sign of the TimestampDiff
.
Trait Implementations
impl Copy for TimestampDiff
[src]
impl Copy for TimestampDiff
impl Clone for TimestampDiff
[src]
impl Clone for TimestampDiff
fn clone(&self) -> TimestampDiff
[src]
fn clone(&self) -> TimestampDiff
Returns 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 Eq for TimestampDiff
[src]
impl Eq for TimestampDiff
impl PartialEq for TimestampDiff
[src]
impl PartialEq for TimestampDiff
fn eq(&self, other: &TimestampDiff) -> bool
[src]
fn eq(&self, other: &TimestampDiff) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TimestampDiff) -> bool
[src]
fn ne(&self, other: &TimestampDiff) -> bool
This method tests for !=
.
impl Ord for TimestampDiff
[src]
impl Ord for TimestampDiff
fn cmp(&self, other: &TimestampDiff) -> Ordering
[src]
fn cmp(&self, other: &TimestampDiff) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for TimestampDiff
[src]
impl PartialOrd for TimestampDiff
fn partial_cmp(&self, other: &TimestampDiff) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &TimestampDiff) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &TimestampDiff) -> bool
[src]
fn lt(&self, other: &TimestampDiff) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &TimestampDiff) -> bool
[src]
fn le(&self, other: &TimestampDiff) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &TimestampDiff) -> bool
[src]
fn gt(&self, other: &TimestampDiff) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &TimestampDiff) -> bool
[src]
fn ge(&self, other: &TimestampDiff) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for TimestampDiff
[src]
impl Debug for TimestampDiff
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for TimestampDiff
[src]
impl Default for TimestampDiff
fn default() -> TimestampDiff
[src]
fn default() -> TimestampDiff
Returns the "default value" for a type. Read more
impl Hash for TimestampDiff
[src]
impl Hash for TimestampDiff
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Add for TimestampDiff
[src]
impl Add for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the +
operator.
fn add(self, other: TimestampDiff) -> TimestampDiff
[src]
fn add(self, other: TimestampDiff) -> TimestampDiff
Performs the +
operation.
impl<'a> Add for &'a TimestampDiff
[src]
impl<'a> Add for &'a TimestampDiff
type Output = TimestampDiff
The resulting type after applying the +
operator.
fn add(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn add(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the +
operation.
impl<'a> Add<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> Add<&'a TimestampDiff> for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the +
operator.
fn add(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn add(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the +
operation.
impl AddAssign for TimestampDiff
[src]
impl AddAssign for TimestampDiff
fn add_assign(&mut self, other: TimestampDiff)
[src]
fn add_assign(&mut self, other: TimestampDiff)
Performs the +=
operation.
impl<'a> AddAssign<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> AddAssign<&'a TimestampDiff> for TimestampDiff
fn add_assign(&mut self, other: &'a TimestampDiff)
[src]
fn add_assign(&mut self, other: &'a TimestampDiff)
Performs the +=
operation.
impl<'a, 'b> AddAssign<&'b TimestampDiff> for &'a mut TimestampDiff
[src]
impl<'a, 'b> AddAssign<&'b TimestampDiff> for &'a mut TimestampDiff
fn add_assign(&mut self, other: &'b TimestampDiff)
[src]
fn add_assign(&mut self, other: &'b TimestampDiff)
Performs the +=
operation.
impl Sub for TimestampDiff
[src]
impl Sub for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the -
operator.
fn sub(self, other: TimestampDiff) -> TimestampDiff
[src]
fn sub(self, other: TimestampDiff) -> TimestampDiff
Performs the -
operation.
impl<'a> Sub for &'a TimestampDiff
[src]
impl<'a> Sub for &'a TimestampDiff
type Output = TimestampDiff
The resulting type after applying the -
operator.
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the -
operation.
impl<'a> Sub<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> Sub<&'a TimestampDiff> for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the -
operator.
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the -
operation.
impl SubAssign for TimestampDiff
[src]
impl SubAssign for TimestampDiff
fn sub_assign(&mut self, other: TimestampDiff)
[src]
fn sub_assign(&mut self, other: TimestampDiff)
Performs the -=
operation.
impl<'a> SubAssign<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> SubAssign<&'a TimestampDiff> for TimestampDiff
fn sub_assign(&mut self, other: &'a TimestampDiff)
[src]
fn sub_assign(&mut self, other: &'a TimestampDiff)
Performs the -=
operation.
impl<'a, 'b> SubAssign<&'b TimestampDiff> for &'a mut TimestampDiff
[src]
impl<'a, 'b> SubAssign<&'b TimestampDiff> for &'a mut TimestampDiff
fn sub_assign(&mut self, other: &'b TimestampDiff)
[src]
fn sub_assign(&mut self, other: &'b TimestampDiff)
Performs the -=
operation.
impl Mul for TimestampDiff
[src]
impl Mul for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the *
operator.
fn mul(self, other: TimestampDiff) -> TimestampDiff
[src]
fn mul(self, other: TimestampDiff) -> TimestampDiff
Performs the *
operation.
impl<'a> Mul for &'a TimestampDiff
[src]
impl<'a> Mul for &'a TimestampDiff
type Output = TimestampDiff
The resulting type after applying the *
operator.
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the *
operation.
impl<'a> Mul<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> Mul<&'a TimestampDiff> for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the *
operator.
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the *
operation.
impl MulAssign for TimestampDiff
[src]
impl MulAssign for TimestampDiff
fn mul_assign(&mut self, other: TimestampDiff)
[src]
fn mul_assign(&mut self, other: TimestampDiff)
Performs the *=
operation.
impl<'a> MulAssign<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> MulAssign<&'a TimestampDiff> for TimestampDiff
fn mul_assign(&mut self, other: &'a TimestampDiff)
[src]
fn mul_assign(&mut self, other: &'a TimestampDiff)
Performs the *=
operation.
impl<'a, 'b> MulAssign<&'b TimestampDiff> for &'a mut TimestampDiff
[src]
impl<'a, 'b> MulAssign<&'b TimestampDiff> for &'a mut TimestampDiff
fn mul_assign(&mut self, other: &'b TimestampDiff)
[src]
fn mul_assign(&mut self, other: &'b TimestampDiff)
Performs the *=
operation.
impl Div for TimestampDiff
[src]
impl Div for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the /
operator.
fn div(self, other: TimestampDiff) -> TimestampDiff
[src]
fn div(self, other: TimestampDiff) -> TimestampDiff
Performs the /
operation.
impl<'a> Div for &'a TimestampDiff
[src]
impl<'a> Div for &'a TimestampDiff
type Output = TimestampDiff
The resulting type after applying the /
operator.
fn div(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn div(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the /
operation.
impl<'a> Div<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> Div<&'a TimestampDiff> for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the /
operator.
fn div(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn div(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the /
operation.
impl DivAssign for TimestampDiff
[src]
impl DivAssign for TimestampDiff
fn div_assign(&mut self, other: TimestampDiff)
[src]
fn div_assign(&mut self, other: TimestampDiff)
Performs the /=
operation.
impl<'a> DivAssign<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> DivAssign<&'a TimestampDiff> for TimestampDiff
fn div_assign(&mut self, other: &'a TimestampDiff)
[src]
fn div_assign(&mut self, other: &'a TimestampDiff)
Performs the /=
operation.
impl<'a, 'b> DivAssign<&'b TimestampDiff> for &'a mut TimestampDiff
[src]
impl<'a, 'b> DivAssign<&'b TimestampDiff> for &'a mut TimestampDiff
fn div_assign(&mut self, other: &'b TimestampDiff)
[src]
fn div_assign(&mut self, other: &'b TimestampDiff)
Performs the /=
operation.
impl Rem for TimestampDiff
[src]
impl Rem for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the %
operator.
fn rem(self, other: TimestampDiff) -> TimestampDiff
[src]
fn rem(self, other: TimestampDiff) -> TimestampDiff
Performs the %
operation.
impl<'a> Rem for &'a TimestampDiff
[src]
impl<'a> Rem for &'a TimestampDiff
type Output = TimestampDiff
The resulting type after applying the %
operator.
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the %
operation.
impl<'a> Rem<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> Rem<&'a TimestampDiff> for TimestampDiff
type Output = TimestampDiff
The resulting type after applying the %
operator.
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff
[src]
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff
Performs the %
operation.
impl RemAssign for TimestampDiff
[src]
impl RemAssign for TimestampDiff
fn rem_assign(&mut self, other: TimestampDiff)
[src]
fn rem_assign(&mut self, other: TimestampDiff)
Performs the %=
operation.
impl<'a> RemAssign<&'a TimestampDiff> for TimestampDiff
[src]
impl<'a> RemAssign<&'a TimestampDiff> for TimestampDiff
fn rem_assign(&mut self, other: &'a TimestampDiff)
[src]
fn rem_assign(&mut self, other: &'a TimestampDiff)
Performs the %=
operation.
impl<'a, 'b> RemAssign<&'b TimestampDiff> for &'a mut TimestampDiff
[src]
impl<'a, 'b> RemAssign<&'b TimestampDiff> for &'a mut TimestampDiff
fn rem_assign(&mut self, other: &'b TimestampDiff)
[src]
fn rem_assign(&mut self, other: &'b TimestampDiff)
Performs the %=
operation.
impl Sizable for TimestampDiff
[src]
impl Sizable for TimestampDiff
impl Checkable for TimestampDiff
[src]
impl Checkable for TimestampDiff
fn check(&self) -> Result<()>
[src]
fn check(&self) -> Result<()>
Checks the implementor.
fn check_async(&self) -> Future<()>
[src]
fn check_async(&self) -> Future<()>
Check asynchronously the implementor.
impl Datable for TimestampDiff
[src]
impl Datable for TimestampDiff
impl Serializable for TimestampDiff
[src]
impl Serializable for TimestampDiff
fn to_json(&self) -> Result<String>
[src]
fn to_json(&self) -> Result<String>
Serializes the implementor into a json string.
fn from_json(s: &str) -> Result<Self>
[src]
fn from_json(s: &str) -> Result<Self>
Deserializes a json string into the implementor type.
fn to_bytes(&self) -> Result<Vec<u8>>
[src]
fn to_bytes(&self) -> Result<Vec<u8>>
Serializes the implementor into a byte vector.
fn from_bytes(b: &[u8]) -> Result<Self>
[src]
fn from_bytes(b: &[u8]) -> Result<Self>
Deserializes a byte vector into the implementor type.
fn to_hex(&self) -> Result<String>
[src]
fn to_hex(&self) -> Result<String>
Serializes the implementor into a hex string.
fn from_hex(s: &str) -> Result<Self>
[src]
fn from_hex(s: &str) -> Result<Self>
Deserializes an hex string into the implementor type.
impl Add<TimestampDiff> for Timestamp
[src]
impl Add<TimestampDiff> for Timestamp
type Output = Timestamp
The resulting type after applying the +
operator.
fn add(self, other: TimestampDiff) -> Timestamp
[src]
fn add(self, other: TimestampDiff) -> Timestamp
Performs the +
operation.
impl<'a> Add<TimestampDiff> for &'a Timestamp
[src]
impl<'a> Add<TimestampDiff> for &'a Timestamp
type Output = Timestamp
The resulting type after applying the +
operator.
fn add(self, other: TimestampDiff) -> Timestamp
[src]
fn add(self, other: TimestampDiff) -> Timestamp
Performs the +
operation.
impl<'a> Add<&'a TimestampDiff> for Timestamp
[src]
impl<'a> Add<&'a TimestampDiff> for Timestamp
type Output = Timestamp
The resulting type after applying the +
operator.
fn add(self, other: &'a TimestampDiff) -> Timestamp
[src]
fn add(self, other: &'a TimestampDiff) -> Timestamp
Performs the +
operation.
impl AddAssign<TimestampDiff> for Timestamp
[src]
impl AddAssign<TimestampDiff> for Timestamp
fn add_assign(&mut self, other: TimestampDiff)
[src]
fn add_assign(&mut self, other: TimestampDiff)
Performs the +=
operation.
impl<'a> AddAssign<&'a TimestampDiff> for Timestamp
[src]
impl<'a> AddAssign<&'a TimestampDiff> for Timestamp
fn add_assign(&mut self, other: &'a TimestampDiff)
[src]
fn add_assign(&mut self, other: &'a TimestampDiff)
Performs the +=
operation.
impl<'a, 'b> AddAssign<&'b TimestampDiff> for &'a mut Timestamp
[src]
impl<'a, 'b> AddAssign<&'b TimestampDiff> for &'a mut Timestamp
fn add_assign(&mut self, other: &'b TimestampDiff)
[src]
fn add_assign(&mut self, other: &'b TimestampDiff)
Performs the +=
operation.
Auto Trait Implementations
impl Send for TimestampDiff
impl Send for TimestampDiff
impl Sync for TimestampDiff
impl Sync for TimestampDiff