pub enum TimeUnitRescale {
Unchanged,
Multiply(i64),
Divide(i64),
}Expand description
How integer values in one TimeUnit are rescaled to another.
Variants§
Implementations§
Source§impl TimeUnitRescale
impl TimeUnitRescale
Sourcepub fn datetime_value(self, v: i64) -> i64
pub fn datetime_value(self, v: i64) -> i64
Rescales a datetime timestamp, rounding down.
Sourcepub fn duration_value(self, v: i64) -> i64
pub fn duration_value(self, v: i64) -> i64
Rescales a duration, rounding towards zero.
Trait Implementations§
Source§impl Clone for TimeUnitRescale
impl Clone for TimeUnitRescale
Source§fn clone(&self) -> TimeUnitRescale
fn clone(&self) -> TimeUnitRescale
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TimeUnitRescale
Source§impl Debug for TimeUnitRescale
impl Debug for TimeUnitRescale
impl Eq for TimeUnitRescale
Source§impl PartialEq for TimeUnitRescale
impl PartialEq for TimeUnitRescale
impl StructuralPartialEq for TimeUnitRescale
Auto Trait Implementations§
impl Freeze for TimeUnitRescale
impl RefUnwindSafe for TimeUnitRescale
impl Send for TimeUnitRescale
impl Sync for TimeUnitRescale
impl Unpin for TimeUnitRescale
impl UnsafeUnpin for TimeUnitRescale
impl UnwindSafe for TimeUnitRescale
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more