Struct toml_datetime::Date
source · pub struct Date {
pub year: u16,
pub month: u8,
pub day: u8,
}
Expand description
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)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Date
impl<'de> Deserialize<'de> for Date
source§fn deserialize<D>(deserializer: D) -> Result<Date, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Date, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for Date
impl Ord for Date
source§impl PartialEq for Date
impl PartialEq for Date
source§impl PartialOrd for Date
impl PartialOrd for Date
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Date
impl Eq for Date
impl StructuralPartialEq for Date
Auto Trait Implementations§
impl Freeze for Date
impl RefUnwindSafe for Date
impl Send for Date
impl Sync for Date
impl Unpin for Date
impl UnwindSafe for Date
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)