Struct tgbot::types::ShippingAddress
source · pub struct ShippingAddress {
pub city: String,
pub country_code: String,
pub post_code: String,
pub state: String,
pub street_line1: String,
pub street_line2: String,
}
Expand description
Represents a shipping address.
Fields§
§city: String
City.
country_code: String
ISO 3166-1 alpha-2 country code.
post_code: String
Address post code.
state: String
State, if applicable.
street_line1: String
First line for the address.
street_line2: String
Second line for the address.
Implementations§
source§impl ShippingAddress
impl ShippingAddress
sourcepub fn new<A, B, C, D, E, F>(
city: A,
country_code: B,
post_code: C,
state: D,
street_line1: E,
street_line2: F
) -> Self
pub fn new<A, B, C, D, E, F>( city: A, country_code: B, post_code: C, state: D, street_line1: E, street_line2: F ) -> Self
Creates a new ShippingAddress
.
§Arguments
city
- City.country_code
- ISO 3166-1 alpha-2 country code.post_code
- Post code.state
- State.street_line1
- First line for the address.street_line2
- Second line for the address.
Trait Implementations§
source§impl Clone for ShippingAddress
impl Clone for ShippingAddress
source§fn clone(&self) -> ShippingAddress
fn clone(&self) -> ShippingAddress
Returns a copy of the value. Read more
1.0.0 · 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 ShippingAddress
impl Debug for ShippingAddress
source§impl<'de> Deserialize<'de> for ShippingAddress
impl<'de> Deserialize<'de> for ShippingAddress
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 PartialEq for ShippingAddress
impl PartialEq for ShippingAddress
source§fn eq(&self, other: &ShippingAddress) -> bool
fn eq(&self, other: &ShippingAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ShippingAddress
impl PartialOrd for ShippingAddress
source§fn partial_cmp(&self, other: &ShippingAddress) -> Option<Ordering>
fn partial_cmp(&self, other: &ShippingAddress) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ShippingAddress
impl Serialize for ShippingAddress
impl StructuralPartialEq for ShippingAddress
Auto Trait Implementations§
impl Freeze for ShippingAddress
impl RefUnwindSafe for ShippingAddress
impl Send for ShippingAddress
impl Sync for ShippingAddress
impl Unpin for ShippingAddress
impl UnwindSafe for ShippingAddress
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