[−][src]Struct muon_rs::DateTime
Date and time with offset
Formatted and validated as
RFC 3339 date-time
.
use muon_rs::DateTime; let datetime = "2019-08-07T16:35:21.363-06:00".parse::<DateTime>().unwrap(); let date = datetime.date(); let time = datetime.time(); let offset = datetime.time_offset();
Methods
impl DateTime
[src]
pub fn date(&self) -> Date
[src]
Get the date
pub fn time(&self) -> Time
[src]
Get the time
pub fn time_offset(&self) -> TimeOffset
[src]
Get the time offset
Trait Implementations
impl Clone for DateTime
[src]
impl Copy for DateTime
[src]
impl Debug for DateTime
[src]
impl<'de> Deserialize<'de> for DateTime
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for DateTime
[src]
impl FromStr for DateTime
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(datetime: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<DateTime> for DateTime
[src]
impl Serialize for DateTime
[src]
impl StructuralPartialEq for DateTime
[src]
Auto Trait Implementations
impl RefUnwindSafe for DateTime
impl Send for DateTime
impl Sync for DateTime
impl Unpin for DateTime
impl UnwindSafe for DateTime
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,