#[repr(i32)]pub enum RouteLabel {
Unspecified = 0,
DefaultRoute = 1,
DefaultRouteAlternate = 2,
FuelEfficient = 3,
ShorterDistance = 4,
}
Expand description
Labels for the [Route
][google.maps.routing.v2.Route] that are useful to
identify specific properties of the route to compare against others.
Variants§
Unspecified = 0
Default - not used.
DefaultRoute = 1
The default “best” route returned for the route computation.
DefaultRouteAlternate = 2
An alternative to the default “best” route. Routes like this will be
returned when
[compute_alternative_routes
][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes]
is specified.
FuelEfficient = 3
Fuel efficient route. Routes labeled with this value are determined to be optimized for Eco parameters such as fuel consumption.
ShorterDistance = 4
Shorter travel distance route. This is an experimental feature.
Implementations§
Source§impl RouteLabel
impl RouteLabel
Source§impl RouteLabel
impl RouteLabel
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for RouteLabel
impl Clone for RouteLabel
Source§fn clone(&self) -> RouteLabel
fn clone(&self) -> RouteLabel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RouteLabel
impl Debug for RouteLabel
Source§impl Default for RouteLabel
impl Default for RouteLabel
Source§fn default() -> RouteLabel
fn default() -> RouteLabel
Source§impl From<RouteLabel> for i32
impl From<RouteLabel> for i32
Source§fn from(value: RouteLabel) -> i32
fn from(value: RouteLabel) -> i32
Source§impl Hash for RouteLabel
impl Hash for RouteLabel
Source§impl Ord for RouteLabel
impl Ord for RouteLabel
Source§fn cmp(&self, other: &RouteLabel) -> Ordering
fn cmp(&self, other: &RouteLabel) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for RouteLabel
impl PartialEq for RouteLabel
Source§impl PartialOrd for RouteLabel
impl PartialOrd for RouteLabel
Source§impl TryFrom<i32> for RouteLabel
impl TryFrom<i32> for RouteLabel
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<RouteLabel, UnknownEnumValue>
fn try_from(value: i32) -> Result<RouteLabel, UnknownEnumValue>
impl Copy for RouteLabel
impl Eq for RouteLabel
impl StructuralPartialEq for RouteLabel
Auto Trait Implementations§
impl Freeze for RouteLabel
impl RefUnwindSafe for RouteLabel
impl Send for RouteLabel
impl Sync for RouteLabel
impl Unpin for RouteLabel
impl UnwindSafe for RouteLabel
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> 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