pub struct PhysicalAddress {
pub city: Option<String>,
pub country_code: Option<PhysicalAddressCountryCode>,
pub line1: Option<String>,
pub line2: Option<String>,
pub post_code: Option<String>,
pub state: Option<String>,
}Expand description
A physical address with standard address components including street, city, state/province, postal code, and country.
JSON schema
{
"description": "A physical address with standard address components including street, city, state/province, postal code, and country.",
"type": "object",
"properties": {
"city": {
"description": "City or locality.",
"examples": [
"San Francisco"
],
"type": "string"
},
"countryCode": {
"description": "ISO 3166-1 alpha-2 country code (2 characters). See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.",
"examples": [
"US"
],
"type": "string",
"maxLength": 2,
"minLength": 2
},
"line1": {
"description": "Primary street address.",
"examples": [
"123 Market St"
],
"type": "string"
},
"line2": {
"description": "Secondary address information.",
"examples": [
"Suite 400"
],
"type": "string"
},
"postCode": {
"description": "Postal or ZIP code.",
"examples": [
"94105"
],
"type": "string"
},
"state": {
"description": "State, province, or region.",
"examples": [
"CA"
],
"type": "string"
}
}
}Fields§
§city: Option<String>City or locality.
country_code: Option<PhysicalAddressCountryCode>ISO 3166-1 alpha-2 country code (2 characters). See https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes.
line1: Option<String>Primary street address.
line2: Option<String>Secondary address information.
post_code: Option<String>Postal or ZIP code.
state: Option<String>State, province, or region.
Implementations§
Source§impl PhysicalAddress
impl PhysicalAddress
pub fn builder() -> PhysicalAddress
Trait Implementations§
Source§impl Clone for PhysicalAddress
impl Clone for PhysicalAddress
Source§fn clone(&self) -> PhysicalAddress
fn clone(&self) -> PhysicalAddress
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 PhysicalAddress
impl Debug for PhysicalAddress
Source§impl Default for PhysicalAddress
impl Default for PhysicalAddress
Source§impl<'de> Deserialize<'de> for PhysicalAddress
impl<'de> Deserialize<'de> for PhysicalAddress
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<&PhysicalAddress> for PhysicalAddress
impl From<&PhysicalAddress> for PhysicalAddress
Source§fn from(value: &PhysicalAddress) -> Self
fn from(value: &PhysicalAddress) -> Self
Converts to this type from the input type.
Source§impl From<PhysicalAddress> for PhysicalAddress
impl From<PhysicalAddress> for PhysicalAddress
Source§fn from(value: PhysicalAddress) -> Self
fn from(value: PhysicalAddress) -> Self
Converts to this type from the input type.
Source§impl Serialize for PhysicalAddress
impl Serialize for PhysicalAddress
Source§impl TryFrom<PhysicalAddress> for PhysicalAddress
impl TryFrom<PhysicalAddress> for PhysicalAddress
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: PhysicalAddress) -> Result<Self, ConversionError>
fn try_from(value: PhysicalAddress) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for PhysicalAddress
impl RefUnwindSafe for PhysicalAddress
impl Send for PhysicalAddress
impl Sync for PhysicalAddress
impl Unpin for PhysicalAddress
impl UnsafeUnpin for PhysicalAddress
impl UnwindSafe for PhysicalAddress
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