pub struct Headers {
pub prices: Vec<Price>,
pub weights: Vec<Weight>,
pub number_of_items: Vec<String>,
pub postal_code_group_names: Vec<String>,
pub locations: Vec<LocationIdSet>,
}
Expand description
A non-empty list of row or column headers for a table.
Exactly one of prices
, weights
,
num_items
, postal_code_group_names
, or
location
must be set.
Fields§
§prices: Vec<Price>
Required. A list of inclusive order price upper bounds. The last price’s
value can be infinity by setting price amount_micros = -1. For example
[{"amount_micros": 10000000, "currency_code": "USD"}, {"amount_micros": 500000000, "currency_code": "USD"}, {"amount_micros": -1, "currency_code": "USD"}]
represents the headers
“<= $10”, “<= $500”, and “> $500”. All prices within a service must have
the same currency. Must be non-empty. Must be positive except -1. Can only
be set if all other fields are not set.
weights: Vec<Weight>
Required. A list of inclusive order weight upper bounds. The last weight’s
value can be infinity by setting price amount_micros = -1. For example
[{"amount_micros": 10000000, "unit": "kg"}, {"amount_micros": 50000000, "unit": "kg"}, {"amount_micros": -1, "unit": "kg"}]
represents the headers
“<= 10kg”, “<= 50kg”, and “> 50kg”. All weights within a service must have
the same unit. Must be non-empty. Must be positive except -1. Can only be
set if all other fields are not set.
number_of_items: Vec<String>
Required. 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: Vec<String>
Required. 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.
locations: Vec<LocationIdSet>
Required. A list of location ID sets. Must be non-empty. Can only be set if all other fields are not set.
Trait Implementations§
source§impl Message for Headers
impl Message for Headers
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Headers
impl PartialEq for Headers
impl StructuralPartialEq 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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request