[][src]Enum zzp::partial_date::PartialDate

pub enum PartialDate {
    Year(Year),
    YearMonth(YearMonth),
    YearMonthDay(Date),
}

Variants

Year(Year)
YearMonth(YearMonth)
YearMonthDay(Date)

Implementations

impl PartialDate[src]

pub fn as_start_date(self) -> Date[src]

Interpret the partial date as start date.

This gives the first day of a year or month if more specific fields are not given.

pub fn as_end_date(self) -> Date[src]

Interpret the partial date as an end date.

This gives the last day of a year or month if more specific fields are not given.

pub fn as_range(self) -> Range<Date>[src]

Interpret the partial date as a half-open date range.

This gives a date range comprising of the entire year or month, or just a single day.

Trait Implementations

impl Clone for PartialDate[src]

impl Copy for PartialDate[src]

impl Debug for PartialDate[src]

impl Eq for PartialDate[src]

impl FromStr for PartialDate[src]

type Err = ParsePartialDateError

The associated error which can be returned from parsing.

impl PartialEq<PartialDate> for PartialDate[src]

impl StructuralEq for PartialDate[src]

impl StructuralPartialEq for PartialDate[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.