#[repr(transparent)]pub struct IsoDuration(pub Duration);Tuple Fields§
§0: DurationMethods from Deref<Target = Duration>§
pub const MAX: Self
pub fn seconds(&self) -> Result<i64, Box<TypeError>>
pub fn milliseconds(&self) -> Result<i64, Box<TypeError>>
pub fn microseconds(&self) -> Result<i64, Box<TypeError>>
pub fn nanoseconds(&self) -> Result<i64, Box<TypeError>>
pub fn get_months(&self) -> i32
pub fn get_days(&self) -> i32
pub fn get_nanos(&self) -> i64
pub fn as_nanos(&self) -> Result<i64, Box<TypeError>>
pub fn is_positive(&self) -> bool
pub fn is_negative(&self) -> bool
pub fn abs(&self) -> Self
pub fn negate(&self) -> Self
pub fn to_iso_string(&self) -> String
pub fn is_zero(&self) -> bool
pub fn to_std(&self) -> StdDuration
Trait Implementations§
Source§impl Clone for IsoDuration
impl Clone for IsoDuration
Source§fn clone(&self) -> IsoDuration
fn clone(&self) -> IsoDuration
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 IsoDuration
Source§impl Debug for IsoDuration
impl Debug for IsoDuration
Source§impl Deref for IsoDuration
impl Deref for IsoDuration
Source§impl<'de> Deserialize<'de> for IsoDuration
impl<'de> Deserialize<'de> for IsoDuration
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for IsoDuration
Source§impl From<Duration> for IsoDuration
impl From<Duration> for IsoDuration
Source§impl From<IsoDuration> for Duration
impl From<IsoDuration> for Duration
Source§fn from(value: IsoDuration) -> Self
fn from(value: IsoDuration) -> Self
Converts to this type from the input type.
Source§impl Hash for IsoDuration
impl Hash for IsoDuration
Source§impl PartialEq for IsoDuration
impl PartialEq for IsoDuration
Source§impl Serialize for IsoDuration
impl Serialize for IsoDuration
impl StructuralPartialEq for IsoDuration
Source§impl TryFromValue for IsoDuration
impl TryFromValue for IsoDuration
fn try_from_value(value: &Value) -> Result<Self, FromValueError>
fn from_value(value: &Value) -> Option<Self>
Auto Trait Implementations§
impl Freeze for IsoDuration
impl RefUnwindSafe for IsoDuration
impl Send for IsoDuration
impl Sync for IsoDuration
impl Unpin for IsoDuration
impl UnsafeUnpin for IsoDuration
impl UnwindSafe for IsoDuration
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