[−][src]Struct muon_rs::Date
Date with no time or offset
Formatted and validated as
RFC 3339 full-date
.
use muon_rs::Date; let date = "2019-08-07".parse::<Date>().unwrap(); let year = date.year(); let month = date.month(); let day = date.day();
Methods
impl Date
[src]
pub fn year(&self) -> u16
[src]
Get the year
pub fn month(&self) -> u8
[src]
Get the month (1-12)
pub fn day(&self) -> u8
[src]
Get the day of month (1-31)
Trait Implementations
impl Clone for Date
[src]
impl Copy for Date
[src]
impl Debug for Date
[src]
impl<'de> Deserialize<'de> for Date
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Display for Date
[src]
impl FromStr for Date
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(date: &str) -> Result<Self, Self::Err>
[src]
impl PartialEq<Date> for Date
[src]
impl Serialize for Date
[src]
impl StructuralPartialEq for Date
[src]
Auto Trait Implementations
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
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>,