pub struct LSPSDateTime(pub DateTime<Utc>);Expand description
An object representing datetimes as described in bLIP-50 / LSPS0.
Tuple Fields§
§0: DateTime<Utc>Implementations§
Source§impl LSPSDateTime
impl LSPSDateTime
Sourcepub fn to_rfc3339(&self) -> String
pub fn to_rfc3339(&self) -> String
Returns the LSPSDateTime as RFC3339 formatted string.
Sourcepub fn is_past(&self) -> bool
Available on crate feature time only.
pub fn is_past(&self) -> bool
time only.Returns if the given time is in the past.
Sourcepub fn duration_since(&self, other: &Self) -> Duration
pub fn duration_since(&self, other: &Self) -> Duration
Returns the absolute difference between two datetimes as a Duration.
Sourcepub fn new_from_duration_since_epoch(duration: Duration) -> Self
pub fn new_from_duration_since_epoch(duration: Duration) -> Self
Returns the time in seconds since the unix epoch.
Trait Implementations§
Source§impl Clone for LSPSDateTime
impl Clone for LSPSDateTime
Source§fn clone(&self) -> LSPSDateTime
fn clone(&self) -> LSPSDateTime
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 LSPSDateTime
impl Debug for LSPSDateTime
Source§impl<'de> Deserialize<'de> for LSPSDateTime
impl<'de> Deserialize<'de> for LSPSDateTime
Source§fn 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
Source§impl Display for LSPSDateTime
impl Display for LSPSDateTime
Source§impl FromStr for LSPSDateTime
impl FromStr for LSPSDateTime
Source§impl Hash for LSPSDateTime
impl Hash for LSPSDateTime
Source§impl PartialEq for LSPSDateTime
impl PartialEq for LSPSDateTime
Source§impl Readable for LSPSDateTime
impl Readable for LSPSDateTime
Source§impl Serialize for LSPSDateTime
impl Serialize for LSPSDateTime
Source§impl Writeable for LSPSDateTime
impl Writeable for LSPSDateTime
impl Copy for LSPSDateTime
impl Eq for LSPSDateTime
impl StructuralPartialEq for LSPSDateTime
Auto Trait Implementations§
impl Freeze for LSPSDateTime
impl RefUnwindSafe for LSPSDateTime
impl Send for LSPSDateTime
impl Sync for LSPSDateTime
impl Unpin for LSPSDateTime
impl UnwindSafe for LSPSDateTime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Reads a
Self in from the given LengthLimitedRead.