Struct mitrid_core::utils::timestamp::timestamp_diff::TimestampDiff [−][src]
pub struct TimestampDiff(_);
Type representing the difference between two Timestamps.
Methods
impl TimestampDiff[src]
impl TimestampDiffpub fn new(tmdiff: i64) -> TimestampDiff[src]
pub fn new(tmdiff: i64) -> TimestampDiffCreates a new TimestampDiff.
pub fn from_i64(tmdiff: i64) -> TimestampDiff[src]
pub fn from_i64(tmdiff: i64) -> TimestampDiffCreates a new TimestampDiff from i64.
pub fn from_u64(tmdiff: u64) -> TimestampDiff[src]
pub fn from_u64(tmdiff: u64) -> TimestampDiffCreates a new TimestampDiff from u64.
pub fn from_duration(dur: Duration) -> TimestampDiff[src]
pub fn from_duration(dur: Duration) -> TimestampDiffCreates a new TimestampDiff from a Duration.
pub fn from_millis(millis: u64) -> TimestampDiff[src]
pub fn from_millis(millis: u64) -> TimestampDiffCreates a new TimestampDiff from milliseconds.
pub fn from_secs(secs: u64) -> TimestampDiff[src]
pub fn from_secs(secs: u64) -> TimestampDiffCreates a new TimestampDiff from seconds.
pub fn as_i64(&self) -> i64[src]
pub fn as_i64(&self) -> i64Converts the TimestampDiff to i64.
pub fn abs(&self) -> u64[src]
pub fn abs(&self) -> u64Converts the TimestampDiff to its absolute representation.
pub fn as_u64(&self) -> u64[src]
pub fn as_u64(&self) -> u64Converts the TimestampDiff to u64.
pub fn as_duration(&self) -> Duration[src]
pub fn as_duration(&self) -> DurationConverts the TimestampDiff to a Duration.
pub fn as_millis(&self) -> u64[src]
pub fn as_millis(&self) -> u64Converts the TimestampDiff to milliseconds.
pub fn as_secs(&self) -> u64[src]
pub fn as_secs(&self) -> u64Converts the TimestampDiff to seconds.
pub fn sign(&self) -> i64[src]
pub fn sign(&self) -> i64Returns the sign of the TimestampDiff.
Trait Implementations
impl Copy for TimestampDiff[src]
impl Copy for TimestampDiffimpl Clone for TimestampDiff[src]
impl Clone for TimestampDifffn clone(&self) -> TimestampDiff[src]
fn clone(&self) -> TimestampDiffReturns 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 TimestampDiffimpl PartialEq for TimestampDiff[src]
impl PartialEq for TimestampDifffn eq(&self, other: &TimestampDiff) -> bool[src]
fn eq(&self, other: &TimestampDiff) -> boolThis 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) -> boolThis method tests for !=.
impl Ord for TimestampDiff[src]
impl Ord for TimestampDifffn cmp(&self, other: &TimestampDiff) -> Ordering[src]
fn cmp(&self, other: &TimestampDiff) -> 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 PartialOrd for TimestampDiff[src]
impl PartialOrd for TimestampDifffn 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) -> boolThis 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) -> boolThis 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) -> boolThis 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) -> boolThis 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 TimestampDifffn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Default for TimestampDiff[src]
impl Default for TimestampDifffn default() -> TimestampDiff[src]
fn default() -> TimestampDiffReturns the "default value" for a type. Read more
impl Hash for TimestampDiff[src]
impl Hash for TimestampDifffn 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 TimestampDifftype Output = TimestampDiff
The resulting type after applying the + operator.
fn add(self, other: TimestampDiff) -> TimestampDiff[src]
fn add(self, other: TimestampDiff) -> TimestampDiffPerforms the + operation.
impl<'a> Add for &'a TimestampDiff[src]
impl<'a> Add for &'a TimestampDifftype Output = TimestampDiff
The resulting type after applying the + operator.
fn add(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn add(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the + operation.
impl<'a> Add<&'a TimestampDiff> for TimestampDiff[src]
impl<'a> Add<&'a TimestampDiff> for TimestampDifftype Output = TimestampDiff
The resulting type after applying the + operator.
fn add(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn add(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the + operation.
impl AddAssign for TimestampDiff[src]
impl AddAssign for TimestampDifffn 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 TimestampDifffn 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 TimestampDifffn 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 TimestampDifftype Output = TimestampDiff
The resulting type after applying the - operator.
fn sub(self, other: TimestampDiff) -> TimestampDiff[src]
fn sub(self, other: TimestampDiff) -> TimestampDiffPerforms the - operation.
impl<'a> Sub for &'a TimestampDiff[src]
impl<'a> Sub for &'a TimestampDifftype Output = TimestampDiff
The resulting type after applying the - operator.
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn sub(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the - operation.
impl<'a> Sub<&'a TimestampDiff> for TimestampDiff[src]
impl<'a> Sub<&'a TimestampDiff> for TimestampDifftype Output = TimestampDiff
The resulting type after applying the - operator.
fn sub(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn sub(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the - operation.
impl SubAssign for TimestampDiff[src]
impl SubAssign for TimestampDifffn 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 TimestampDifffn 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 TimestampDifffn 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 TimestampDifftype Output = TimestampDiff
The resulting type after applying the * operator.
fn mul(self, other: TimestampDiff) -> TimestampDiff[src]
fn mul(self, other: TimestampDiff) -> TimestampDiffPerforms the * operation.
impl<'a> Mul for &'a TimestampDiff[src]
impl<'a> Mul for &'a TimestampDifftype Output = TimestampDiff
The resulting type after applying the * operator.
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn mul(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the * operation.
impl<'a> Mul<&'a TimestampDiff> for TimestampDiff[src]
impl<'a> Mul<&'a TimestampDiff> for TimestampDifftype Output = TimestampDiff
The resulting type after applying the * operator.
fn mul(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn mul(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the * operation.
impl MulAssign for TimestampDiff[src]
impl MulAssign for TimestampDifffn 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 TimestampDifffn 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 TimestampDifffn 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 TimestampDifftype Output = TimestampDiff
The resulting type after applying the / operator.
fn div(self, other: TimestampDiff) -> TimestampDiff[src]
fn div(self, other: TimestampDiff) -> TimestampDiffPerforms the / operation.
impl<'a> Div for &'a TimestampDiff[src]
impl<'a> Div for &'a TimestampDifftype Output = TimestampDiff
The resulting type after applying the / operator.
fn div(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn div(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the / operation.
impl<'a> Div<&'a TimestampDiff> for TimestampDiff[src]
impl<'a> Div<&'a TimestampDiff> for TimestampDifftype Output = TimestampDiff
The resulting type after applying the / operator.
fn div(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn div(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the / operation.
impl DivAssign for TimestampDiff[src]
impl DivAssign for TimestampDifffn 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 TimestampDifffn 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 TimestampDifffn 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 TimestampDifftype Output = TimestampDiff
The resulting type after applying the % operator.
fn rem(self, other: TimestampDiff) -> TimestampDiff[src]
fn rem(self, other: TimestampDiff) -> TimestampDiffPerforms the % operation.
impl<'a> Rem for &'a TimestampDiff[src]
impl<'a> Rem for &'a TimestampDifftype Output = TimestampDiff
The resulting type after applying the % operator.
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn rem(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the % operation.
impl<'a> Rem<&'a TimestampDiff> for TimestampDiff[src]
impl<'a> Rem<&'a TimestampDiff> for TimestampDifftype Output = TimestampDiff
The resulting type after applying the % operator.
fn rem(self, other: &'a TimestampDiff) -> TimestampDiff[src]
fn rem(self, other: &'a TimestampDiff) -> TimestampDiffPerforms the % operation.
impl RemAssign for TimestampDiff[src]
impl RemAssign for TimestampDifffn 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 TimestampDifffn 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 TimestampDifffn 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 TimestampDiffimpl Checkable for TimestampDiff[src]
impl Checkable for TimestampDifffn 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 TimestampDiffimpl Serializable for TimestampDiff[src]
impl Serializable for TimestampDifffn 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 Timestamptype Output = Timestamp
The resulting type after applying the + operator.
fn add(self, other: TimestampDiff) -> Timestamp[src]
fn add(self, other: TimestampDiff) -> TimestampPerforms the + operation.
impl<'a> Add<TimestampDiff> for &'a Timestamp[src]
impl<'a> Add<TimestampDiff> for &'a Timestamptype Output = Timestamp
The resulting type after applying the + operator.
fn add(self, other: TimestampDiff) -> Timestamp[src]
fn add(self, other: TimestampDiff) -> TimestampPerforms the + operation.
impl<'a> Add<&'a TimestampDiff> for Timestamp[src]
impl<'a> Add<&'a TimestampDiff> for Timestamptype Output = Timestamp
The resulting type after applying the + operator.
fn add(self, other: &'a TimestampDiff) -> Timestamp[src]
fn add(self, other: &'a TimestampDiff) -> TimestampPerforms the + operation.
impl AddAssign<TimestampDiff> for Timestamp[src]
impl AddAssign<TimestampDiff> for Timestampfn 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 Timestampfn 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 Timestampfn 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 TimestampDiffimpl Sync for TimestampDiff
impl Sync for TimestampDiff