Struct google_api_proto::google::maps::routes::v1::compute_custom_routes_response::FallbackInfo
source · pub struct FallbackInfo {
pub routing_mode: i32,
pub routing_mode_reason: i32,
pub route_objective: i32,
}
Expand description
Encapsulates fallback info for ComputeCustomRoutes. ComputeCustomRoutes performs two types of fallbacks:
-
If it cannot compute the route using the routing_preference requested by the customer, it will fallback to another routing mode. In this case fallback_routing_mode and routing_mode_fallback_reason are used to communicate the fallback routing mode used, as well as the reason for fallback.
-
If it cannot compute a ‘best’ route for the route objective specified by the customer, it might fallback to another objective. fallback_route_objective is used to communicate the fallback route objective.
Fields§
§routing_mode: i32
Routing mode used for the response. If fallback was triggered, the mode may be different from routing preference set in the original client request.
routing_mode_reason: i32
The reason why fallback response was used instead of the original response. This field is only populated when the fallback mode is triggered and the fallback response is returned.
route_objective: i32
The route objective used for the response. If fallback was triggered, the objective may be different from the route objective provided in the original client request.
Implementations§
source§impl FallbackInfo
impl FallbackInfo
sourcepub fn routing_mode(&self) -> FallbackRoutingMode
pub fn routing_mode(&self) -> FallbackRoutingMode
Returns the enum value of routing_mode
, or the default if the field is set to an invalid enum value.
sourcepub fn set_routing_mode(&mut self, value: FallbackRoutingMode)
pub fn set_routing_mode(&mut self, value: FallbackRoutingMode)
Sets routing_mode
to the provided enum value.
sourcepub fn routing_mode_reason(&self) -> FallbackReason
pub fn routing_mode_reason(&self) -> FallbackReason
Returns the enum value of routing_mode_reason
, or the default if the field is set to an invalid enum value.
sourcepub fn set_routing_mode_reason(&mut self, value: FallbackReason)
pub fn set_routing_mode_reason(&mut self, value: FallbackReason)
Sets routing_mode_reason
to the provided enum value.
sourcepub fn route_objective(&self) -> FallbackRouteObjective
pub fn route_objective(&self) -> FallbackRouteObjective
Returns the enum value of route_objective
, or the default if the field is set to an invalid enum value.
sourcepub fn set_route_objective(&mut self, value: FallbackRouteObjective)
pub fn set_route_objective(&mut self, value: FallbackRouteObjective)
Sets route_objective
to the provided enum value.
Trait Implementations§
source§impl Clone for FallbackInfo
impl Clone for FallbackInfo
source§fn clone(&self) -> FallbackInfo
fn clone(&self) -> FallbackInfo
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for FallbackInfo
impl Debug for FallbackInfo
source§impl Default for FallbackInfo
impl Default for FallbackInfo
source§impl Message for FallbackInfo
impl Message for FallbackInfo
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 FallbackInfo
impl PartialEq for FallbackInfo
source§fn eq(&self, other: &FallbackInfo) -> bool
fn eq(&self, other: &FallbackInfo) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for FallbackInfo
impl StructuralPartialEq for FallbackInfo
Auto Trait Implementations§
impl Freeze for FallbackInfo
impl RefUnwindSafe for FallbackInfo
impl Send for FallbackInfo
impl Sync for FallbackInfo
impl Unpin for FallbackInfo
impl UnwindSafe for FallbackInfo
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