#[non_exhaustive]pub struct PartialDate {
pub at_type: Option<String>,
pub year: Option<u32>,
pub month: Option<u32>,
pub day: Option<u32>,
pub calendar_scale: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A complete or partial Gregorian calendar date (RFC 9553 §2.8.1).
Used by Anniversary. Any of year, month, day may be absent,
representing a partial date; month requires either year or day,
and day requires month.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.at_type: Option<String>Object type discriminator; always "PartialDate" on the wire.
year: Option<u32>Calendar year.
month: Option<u32>Calendar month, 1..=12.
day: Option<u32>Calendar day of month, 1..=31.
calendar_scale: Option<String>Calendar system (lowercase CLDR name or vendor-specific value).
extra: Map<String, Value>Catch-all for vendor / site / private extension fields not covered by the typed fields above. Preserves unknown fields across deserialize/serialize round-trip per workspace extras-preservation policy (see workspace AGENTS.md).
Trait Implementations§
Source§impl Clone for PartialDate
impl Clone for PartialDate
Source§fn clone(&self) -> PartialDate
fn clone(&self) -> PartialDate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PartialDate
impl Debug for PartialDate
Source§impl<'de> Deserialize<'de> for PartialDate
impl<'de> Deserialize<'de> for PartialDate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartialDate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PartialDate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PartialDate
impl PartialEq for PartialDate
Source§fn eq(&self, other: &PartialDate) -> bool
fn eq(&self, other: &PartialDate) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PartialDate
impl Serialize for PartialDate
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for PartialDate
impl StructuralPartialEq for PartialDate
Auto Trait Implementations§
impl Freeze for PartialDate
impl RefUnwindSafe for PartialDate
impl Send for PartialDate
impl Sync for PartialDate
impl Unpin for PartialDate
impl UnsafeUnpin for PartialDate
impl UnwindSafe for PartialDate
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