Struct google_api_proto::google::cloud::optimization::v1::shipment_model::PrecedenceRule
source · pub struct PrecedenceRule {
pub first_index: Option<i32>,
pub first_is_delivery: bool,
pub second_index: Option<i32>,
pub second_is_delivery: bool,
pub offset_duration: Option<Duration>,
}
Expand description
A precedence rule between two events (each event is the pickup or the
delivery of a shipment): the “second” event has to start at least
offset_duration
after “first” has started.
Several precedences can refer to the same (or related) events, e.g., “pickup of B happens after delivery of A” and “pickup of C happens after pickup of B”.
Furthermore, precedences only apply when both shipments are performed and are otherwise ignored.
Fields§
§first_index: Option<i32>
Shipment index of the “first” event. This field must be specified.
first_is_delivery: bool
Indicates if the “first” event is a delivery.
second_index: Option<i32>
Shipment index of the “second” event. This field must be specified.
second_is_delivery: bool
Indicates if the “second” event is a delivery.
offset_duration: Option<Duration>
The offset between the “first” and “second” event. It can be negative.
Implementations§
source§impl PrecedenceRule
impl PrecedenceRule
sourcepub fn first_index(&self) -> i32
pub fn first_index(&self) -> i32
Returns the value of first_index
, or the default value if first_index
is unset.
sourcepub fn second_index(&self) -> i32
pub fn second_index(&self) -> i32
Returns the value of second_index
, or the default value if second_index
is unset.
Trait Implementations§
source§impl Clone for PrecedenceRule
impl Clone for PrecedenceRule
source§fn clone(&self) -> PrecedenceRule
fn clone(&self) -> PrecedenceRule
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PrecedenceRule
impl Debug for PrecedenceRule
source§impl Default for PrecedenceRule
impl Default for PrecedenceRule
source§impl Message for PrecedenceRule
impl Message for PrecedenceRule
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 PrecedenceRule
impl PartialEq for PrecedenceRule
source§fn eq(&self, other: &PrecedenceRule) -> bool
fn eq(&self, other: &PrecedenceRule) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for PrecedenceRule
impl StructuralPartialEq for PrecedenceRule
Auto Trait Implementations§
impl Freeze for PrecedenceRule
impl RefUnwindSafe for PrecedenceRule
impl Send for PrecedenceRule
impl Sync for PrecedenceRule
impl Unpin for PrecedenceRule
impl UnwindSafe for PrecedenceRule
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