pub struct OrderInfo {
pub email: Option<String>,
pub name: Option<String>,
pub phone_number: Option<String>,
pub shipping_address: Option<ShippingAddress>,
}
Expand description
Represents an order.
Fields§
§email: Option<String>
User’s email.
name: Option<String>
User’s name.
phone_number: Option<String>
User’s phone number.
shipping_address: Option<ShippingAddress>
User’s shipping address.
Implementations§
source§impl OrderInfo
impl OrderInfo
sourcepub fn with_email<T>(self, value: T) -> OrderInfo
pub fn with_email<T>(self, value: T) -> OrderInfo
sourcepub fn with_phone_number<T>(self, value: T) -> OrderInfo
pub fn with_phone_number<T>(self, value: T) -> OrderInfo
sourcepub fn with_shipping_address(self, value: ShippingAddress) -> OrderInfo
pub fn with_shipping_address(self, value: ShippingAddress) -> OrderInfo
Trait Implementations§
source§impl<'de> Deserialize<'de> for OrderInfo
impl<'de> Deserialize<'de> for OrderInfo
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<OrderInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<OrderInfo, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for OrderInfo
impl PartialEq for OrderInfo
source§impl PartialOrd for OrderInfo
impl PartialOrd for OrderInfo
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 OrderInfo
impl Serialize for OrderInfo
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for OrderInfo
Auto Trait Implementations§
impl Freeze for OrderInfo
impl RefUnwindSafe for OrderInfo
impl Send for OrderInfo
impl Sync for OrderInfo
impl Unpin for OrderInfo
impl UnwindSafe for OrderInfo
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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