pub struct DateOfBirthLenient {
pub day: Option<DateOfBirthLenientDay>,
pub month: Option<DateOfBirthLenientMonth>,
pub year: Option<DateOfBirthLenientYear>,
}Expand description
Date of birth with lenient formatting. Accepts both zero-padded (“04”, “07”) and single-digit (“4”, “7”) values for day and month.
JSON schema
{
"description": "Date of birth with lenient formatting. Accepts both zero-padded (\"04\", \"07\")\nand single-digit (\"4\", \"7\") values for day and month.\n",
"examples": [
{
"day": "15",
"month": "08",
"year": "1990"
}
],
"type": "object",
"properties": {
"day": {
"description": "Day of birth (1-31). Both single-digit (\"7\") and zero-padded (\"07\") formats are accepted.",
"examples": [
"15"
],
"type": "string",
"maxLength": 2,
"minLength": 1,
"pattern": "^(?:0?[1-9]|[12][0-9]|3[01])$"
},
"month": {
"description": "Month of birth (1-12). Both single-digit (\"4\") and zero-padded (\"04\") formats are accepted.",
"examples": [
"08"
],
"type": "string",
"maxLength": 2,
"minLength": 1,
"pattern": "^(?:0?[1-9]|1[0-2])$"
},
"year": {
"description": "Year of birth (four digits).",
"examples": [
"1990"
],
"type": "string",
"maxLength": 4,
"minLength": 4,
"pattern": "^[0-9]{4}$"
}
},
"additionalProperties": false
}Fields§
§day: Option<DateOfBirthLenientDay>Day of birth (1-31). Both single-digit (“7”) and zero-padded (“07”) formats are accepted.
month: Option<DateOfBirthLenientMonth>Month of birth (1-12). Both single-digit (“4”) and zero-padded (“04”) formats are accepted.
year: Option<DateOfBirthLenientYear>Year of birth (four digits).
Implementations§
Source§impl DateOfBirthLenient
impl DateOfBirthLenient
pub fn builder() -> DateOfBirthLenient
Trait Implementations§
Source§impl Clone for DateOfBirthLenient
impl Clone for DateOfBirthLenient
Source§impl Debug for DateOfBirthLenient
impl Debug for DateOfBirthLenient
Source§impl Default for DateOfBirthLenient
impl Default for DateOfBirthLenient
Source§impl<'de> Deserialize<'de> for DateOfBirthLenient
impl<'de> Deserialize<'de> for DateOfBirthLenient
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<&DateOfBirthLenient> for DateOfBirthLenient
impl From<&DateOfBirthLenient> for DateOfBirthLenient
Source§fn from(value: &DateOfBirthLenient) -> Self
fn from(value: &DateOfBirthLenient) -> Self
Converts to this type from the input type.
Source§impl From<DateOfBirthLenient> for DateOfBirthLenient
impl From<DateOfBirthLenient> for DateOfBirthLenient
Source§fn from(value: DateOfBirthLenient) -> Self
fn from(value: DateOfBirthLenient) -> Self
Converts to this type from the input type.
Source§impl Serialize for DateOfBirthLenient
impl Serialize for DateOfBirthLenient
Source§impl TryFrom<DateOfBirthLenient> for DateOfBirthLenient
impl TryFrom<DateOfBirthLenient> for DateOfBirthLenient
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: DateOfBirthLenient) -> Result<Self, ConversionError>
fn try_from(value: DateOfBirthLenient) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for DateOfBirthLenient
impl RefUnwindSafe for DateOfBirthLenient
impl Send for DateOfBirthLenient
impl Sync for DateOfBirthLenient
impl Unpin for DateOfBirthLenient
impl UnsafeUnpin for DateOfBirthLenient
impl UnwindSafe for DateOfBirthLenient
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