pub struct DateOfBirth {
pub day: Option<DateOfBirthDay>,
pub month: Option<DateOfBirthMonth>,
pub year: Option<DateOfBirthYear>,
}Expand description
Date of birth.
JSON schema
{
"description": "Date of birth.",
"examples": [
{
"day": "15",
"month": "08",
"year": "1990"
}
],
"type": "object",
"properties": {
"day": {
"description": "Day of birth (01-31).",
"examples": [
"15"
],
"type": "string",
"maxLength": 2,
"minLength": 2,
"pattern": "^[0-9]{2}$"
},
"month": {
"description": "Month of birth (01-12).",
"examples": [
"08"
],
"type": "string",
"maxLength": 2,
"minLength": 2,
"pattern": "^[0-9]{2}$"
},
"year": {
"description": "Year of birth (four digits).",
"examples": [
"1990"
],
"type": "string",
"maxLength": 4,
"minLength": 4,
"pattern": "^[0-9]{4}$"
}
}
}Fields§
§day: Option<DateOfBirthDay>Day of birth (01-31).
month: Option<DateOfBirthMonth>Month of birth (01-12).
year: Option<DateOfBirthYear>Year of birth (four digits).
Implementations§
Source§impl DateOfBirth
impl DateOfBirth
pub fn builder() -> DateOfBirth
Trait Implementations§
Source§impl Clone for DateOfBirth
impl Clone for DateOfBirth
Source§fn clone(&self) -> DateOfBirth
fn clone(&self) -> DateOfBirth
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 DateOfBirth
impl Debug for DateOfBirth
Source§impl Default for DateOfBirth
impl Default for DateOfBirth
Source§impl<'de> Deserialize<'de> for DateOfBirth
impl<'de> Deserialize<'de> for DateOfBirth
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
Source§impl From<&DateOfBirth> for DateOfBirth
impl From<&DateOfBirth> for DateOfBirth
Source§fn from(value: &DateOfBirth) -> Self
fn from(value: &DateOfBirth) -> Self
Converts to this type from the input type.
Source§impl From<DateOfBirth> for DateOfBirth
impl From<DateOfBirth> for DateOfBirth
Source§fn from(value: DateOfBirth) -> Self
fn from(value: DateOfBirth) -> Self
Converts to this type from the input type.
Source§impl Serialize for DateOfBirth
impl Serialize for DateOfBirth
Source§impl TryFrom<DateOfBirth> for DateOfBirth
impl TryFrom<DateOfBirth> for DateOfBirth
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: DateOfBirth) -> Result<Self, ConversionError>
fn try_from(value: DateOfBirth) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DateOfBirth
impl RefUnwindSafe for DateOfBirth
impl Send for DateOfBirth
impl Sync for DateOfBirth
impl Unpin for DateOfBirth
impl UnsafeUnpin for DateOfBirth
impl UnwindSafe for DateOfBirth
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