Struct aws_lambda_events::encodings::MinuteDuration
source · [−]pub struct MinuteDuration(pub Duration);
Expand description
Duration with minute precision.
Tuple Fields
0: Duration
Methods from Deref<Target = Duration>
sourcepub fn num_minutes(&self) -> i64
pub fn num_minutes(&self) -> i64
Returns the total number of whole minutes in the duration.
sourcepub fn num_seconds(&self) -> i64
pub fn num_seconds(&self) -> i64
Returns the total number of whole seconds in the duration.
sourcepub fn num_milliseconds(&self) -> i64
pub fn num_milliseconds(&self) -> i64
Returns the total number of whole milliseconds in the duration,
sourcepub fn num_microseconds(&self) -> Option<i64>
pub fn num_microseconds(&self) -> Option<i64>
Returns the total number of whole microseconds in the duration,
or None
on overflow (exceeding 263 microseconds in either direction).
sourcepub fn num_nanoseconds(&self) -> Option<i64>
pub fn num_nanoseconds(&self) -> Option<i64>
Returns the total number of whole nanoseconds in the duration,
or None
on overflow (exceeding 263 nanoseconds in either direction).
sourcepub fn checked_add(&self, rhs: &Duration) -> Option<Duration>
pub fn checked_add(&self, rhs: &Duration) -> Option<Duration>
Add two durations, returning None
if overflow occurred.
sourcepub fn checked_sub(&self, rhs: &Duration) -> Option<Duration>
pub fn checked_sub(&self, rhs: &Duration) -> Option<Duration>
Subtract two durations, returning None
if overflow occurred.
sourcepub fn to_std(&self) -> Result<Duration, OutOfRangeError>
pub fn to_std(&self) -> Result<Duration, OutOfRangeError>
Creates a std::time::Duration
object from time::Duration
This function errors when duration is less than zero. As standard library implementation is limited to non-negative values.
Trait Implementations
sourceimpl Clone for MinuteDuration
impl Clone for MinuteDuration
sourcefn clone(&self) -> MinuteDuration
fn clone(&self) -> MinuteDuration
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MinuteDuration
impl Debug for MinuteDuration
sourceimpl Deref for MinuteDuration
impl Deref for MinuteDuration
sourceimpl DerefMut for MinuteDuration
impl DerefMut for MinuteDuration
sourceimpl<'de> Deserialize<'de> for MinuteDuration
impl<'de> Deserialize<'de> for MinuteDuration
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl PartialEq<MinuteDuration> for MinuteDuration
impl PartialEq<MinuteDuration> for MinuteDuration
sourcefn eq(&self, other: &MinuteDuration) -> bool
fn eq(&self, other: &MinuteDuration) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MinuteDuration) -> bool
fn ne(&self, other: &MinuteDuration) -> bool
This method tests for !=
.
sourceimpl Serialize for MinuteDuration
impl Serialize for MinuteDuration
impl StructuralPartialEq for MinuteDuration
Auto Trait Implementations
impl RefUnwindSafe for MinuteDuration
impl Send for MinuteDuration
impl Sync for MinuteDuration
impl Unpin for MinuteDuration
impl UnwindSafe for MinuteDuration
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more