pub struct EdmDuration(/* private fields */);Expand description
EdmDuration represented by Edm.EdmDuration type.
This type designed to prevent data loss during deserialization and provides conversion to specific data types. If you don’t care about precision you can always use conversion to f64 seconds.
Implementations§
Source§impl EdmDuration
impl EdmDuration
Sourcepub fn as_f64_seconds(&self) -> f64
pub fn as_f64_seconds(&self) -> f64
Convert to seconds represented as f64. Note that this function may return +Inf or -Inf if number outside of f64 range.
Sourcepub const fn as_decimal(&self) -> Decimal
pub const fn as_decimal(&self) -> Decimal
Extract seconds represented be Decimal from EdmDuration.
Trait Implementations§
Source§impl Clone for EdmDuration
impl Clone for EdmDuration
Source§fn clone(&self) -> EdmDuration
fn clone(&self) -> EdmDuration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EdmDuration
impl Debug for EdmDuration
Source§impl<'de> Deserialize<'de> for EdmDuration
impl<'de> Deserialize<'de> for EdmDuration
Source§fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EdmDuration
impl Display for EdmDuration
Source§impl FromStr for EdmDuration
impl FromStr for EdmDuration
Source§impl Serialize for EdmDuration
impl Serialize for EdmDuration
Source§impl TryFrom<EdmDuration> for Duration
impl TryFrom<EdmDuration> for Duration
impl Copy for EdmDuration
Auto Trait Implementations§
impl Freeze for EdmDuration
impl RefUnwindSafe for EdmDuration
impl Send for EdmDuration
impl Sync for EdmDuration
impl Unpin for EdmDuration
impl UnsafeUnpin for EdmDuration
impl UnwindSafe for EdmDuration
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