#[non_exhaustive]pub struct Birthdate {
pub day: u8,
pub month: u8,
pub year: Option<u16>,
}Expand description
A user’s birthdate.
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.day: u8Day of the user’s birth (1–31).
month: u8Month of the user’s birth (1–12).
year: Option<u16>Year of the user’s birth, if the user chose to share it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Birthdate
impl<'de> Deserialize<'de> for Birthdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Birthdate
impl RefUnwindSafe for Birthdate
impl Send for Birthdate
impl Sync for Birthdate
impl Unpin for Birthdate
impl UnsafeUnpin for Birthdate
impl UnwindSafe for Birthdate
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