pub struct USPSAddress {Show 18 fields
pub firmname: Option<String>,
pub address1: Option<String>,
pub address2: Option<String>,
pub city: Option<String>,
pub state: Option<String>,
pub urbanization: Option<String>,
pub zip5: Option<String>,
pub zip4: Option<String>,
pub city_abbreviation: Option<String>,
pub delivery_point: Option<String>,
pub carrier_route: Option<String>,
pub footnotes: Option<String>,
pub dpv_cmra: Option<String>,
pub dpv_confirmation: Option<String>,
pub dpv_footnotes: Option<String>,
pub business: Option<String>,
pub central_delivery_point: Option<String>,
pub vacant: Option<String>,
}Expand description
This struct represents a complete US address. None of the fields are required, howver a blank address is not particularly useful.
Fields§
§firmname: Option<String>The name of the business at the location
address1: Option<String>The first line of an address. e.g. 123 Main St
address2: Option<String>The second line of an address. e.g. Apt 123
city: Option<String>US City
state: Option<String>US State. Preferably a two letter abbreviation.
urbanization: Option<String>For use in Puerto Rico only
zip5: Option<String>5 digit zip code e.g. 12345
zip4: Option<String>4 digit zip code extension. e.g. 12345-XXXX
city_abbreviation: Option<String>Set upon return from verify_address
delivery_point: Option<String>Set upon return from verify_address
carrier_route: Option<String>Set upon return from verify_address
footnotes: Option<String>Set upon return from verify_address
dpv_cmra: Option<String>Set upon return from verify_address
dpv_confirmation: Option<String>Set upon return from verify_address
dpv_footnotes: Option<String>Set upon return from verify_address
business: Option<String>Set upon return from verify_address
central_delivery_point: Option<String>Set upon return from verify_address
vacant: Option<String>Set upon return from verify_address
Implementations§
Source§impl USPSAddress
impl USPSAddress
Sourcepub fn init(
firmname: &str,
address_1: &str,
address_2: &str,
city: &str,
state: &str,
urbanization: &str,
zip5: &str,
zip4: &str,
) -> Self
pub fn init( firmname: &str, address_1: &str, address_2: &str, city: &str, state: &str, urbanization: &str, zip5: &str, zip4: &str, ) -> Self
Convenience function to save having to write Some(String::from()) over and over again.
§Example
let address = USPSAddress::init("", "123 Main St.", "", "Big Town", "Washington", "", "99999", "");Trait Implementations§
Source§impl Debug for USPSAddress
impl Debug for USPSAddress
Source§impl Default for USPSAddress
impl Default for USPSAddress
Source§impl PartialEq for USPSAddress
impl PartialEq for USPSAddress
impl StructuralPartialEq for USPSAddress
Auto Trait Implementations§
impl Freeze for USPSAddress
impl RefUnwindSafe for USPSAddress
impl Send for USPSAddress
impl Sync for USPSAddress
impl Unpin for USPSAddress
impl UnwindSafe for USPSAddress
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more