#[non_exhaustive]pub struct NDay {
pub at_type: String,
pub day: String,
pub nth_of_period: Option<i32>,
pub extra: Map<String, Value>,
}Expand description
The nthOfPeriod field of an NDay entry (RFC 8984 §4.3.3).
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: StringObject type discriminator; always "NDay" on the wire.
Deserialize is liberal: if @type is absent (spec-violating
vendor input), this field defaults to "NDay" rather than
failing the whole parent object’s deserialize. Serialize always
emits the field. See bd:JMAP-ky8g.10.
day: StringDay of the week: "mo", "tu", "we", "th", "fr", "sa", "su".
nth_of_period: Option<i32>Which occurrence within the period (non-zero integer), or null.
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<'de> Deserialize<'de> for NDay
impl<'de> Deserialize<'de> for NDay
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NDay, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NDay, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for NDay
Source§impl Serialize for NDay
impl Serialize for NDay
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 StructuralPartialEq for NDay
Auto Trait Implementations§
impl Freeze for NDay
impl RefUnwindSafe for NDay
impl Send for NDay
impl Sync for NDay
impl Unpin for NDay
impl UnsafeUnpin for NDay
impl UnwindSafe for NDay
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