Struct Date
pub struct Date { pub year: u16, pub month: u8, pub day: u8 }
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: u16Year: four digits
month: u8Month: 1 to 12
day: u8Day: 1 to {28, 29, 30, 31} (based on month/year)
Trait Implementations
impl Clone for Date
fn clone(&self) -> Self
impl Copy for Date
impl Debug for Date
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for Date
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Date
impl Ord for Date
fn cmp(&self, other: &Self) -> Ordering
impl PartialEq for Date
fn eq(&self, other: &Self) -> bool
impl PartialOrd for Date
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl Serialize for Date
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer,
impl StructuralPartialEq for Date
impl<'de> Deserialize<'de> for Date
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where D: Deserializer<'de>,