Struct Date

struct Date { ... }

A parsed TOML date value

May be part of a Datetime. Alone, Date corresponds to a Local Date. From the TOML v1.0.0 spec:

If you include only the date portion of an RFC 3339 formatted date-time, it will represent that entire day without any relation to an offset or timezone.

ld1 = 1979-05-27

Fields

year: u16

Year: four digits

month: u8

Month: 1 to 12

day: u8

Day: 1 to {28, 29, 30, 31} (based on month/year)

Implementations

impl Clone for Date

fn clone(self: &Self) -> Date

impl Copy for Date

impl Debug for Date

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Display for Date

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Eq for Date

impl Freeze for Date

impl Ord for Date

fn cmp(self: &Self, other: &Date) -> Ordering

impl PartialEq for Date

fn eq(self: &Self, other: &Date) -> bool

impl PartialOrd for Date

fn partial_cmp(self: &Self, other: &Date) -> Option<Ordering>

impl RefUnwindSafe for Date

impl Send for Date

impl Serialize for Date

fn serialize<S>(self: &Self, serializer: S) -> Result<<S as >::Ok, <S as >::Error>
where
    S: Serializer

impl StructuralPartialEq for Date

impl Sync for Date

impl Unpin for Date

impl UnsafeUnpin for Date

impl UnwindSafe for Date

impl<'de> Deserialize for Date

fn deserialize<D>(deserializer: D) -> Result<Self, <D as >::Error>
where
    D: Deserializer<'de>

impl<T> Any for Date

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Date

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Date

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Date

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> DeserializeOwned for Date

impl<T> From for Date

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for Date

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> ToString for Date

fn to_string(self: &Self) -> String

impl<T, U> Into for Date

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Date

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Date

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>