pub struct Headers {
pub locations: Option<Vec<LocationIdSet>>,
pub number_of_items: Option<Vec<String>>,
pub postal_code_group_names: Option<Vec<String>>,
pub prices: Option<Vec<Price>>,
pub weights: Option<Vec<Weight>>,
}
Expand description
A non-empty list of row or column headers for a table. Exactly one of prices
, weights
, numItems
, postalCodeGroupNames
, or location
must be set.
This type is not used in any activity, and only used as part of another schema.
Fields§
§locations: Option<Vec<LocationIdSet>>
A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
number_of_items: Option<Vec<String>>
A list of inclusive number of items upper bounds. The last value can be "infinity"
. For example ["10", "50", "infinity"]
represents the headers “<= 10 items”, “<= 50 items”, and “> 50 items”. Must be non-empty. Can only be set if all other fields are not set.
postal_code_group_names: Option<Vec<String>>
A list of postal group names. The last value can be "all other locations"
. Example: ["zone 1", "zone 2", "all other locations"]
. The referred postal code groups must match the delivery country of the service. Must be non-empty. Can only be set if all other fields are not set.
prices: Option<Vec<Price>>
A list of inclusive order price upper bounds. The last price’s value can be "infinity"
. For example [{"value": "10", "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value": "infinity", "currency": "USD"}]
represents the headers “<= $10”, “<= $500”, and “> $500”. All prices within a service must have the same currency. Must be non-empty. Can only be set if all other fields are not set.
weights: Option<Vec<Weight>>
A list of inclusive order weight upper bounds. The last weight’s value can be "infinity"
. For example [{"value": "10", "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity", "unit": "kg"}]
represents the headers “<= 10kg”, “<= 50kg”, and “> 50kg”. All weights within a service must have the same unit. Must be non-empty. Can only be set if all other fields are not set.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Headers
impl<'de> Deserialize<'de> for Headers
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>,
impl Part for Headers
Auto Trait Implementations§
impl Freeze for Headers
impl RefUnwindSafe for Headers
impl Send for Headers
impl Sync for Headers
impl Unpin for Headers
impl UnwindSafe for Headers
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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