#[repr(i32)]pub enum RouteMatrixElementCondition {
Unspecified = 0,
RouteExists = 1,
RouteNotFound = 2,
}
Expand description
The condition of the route being returned.
Variants§
Unspecified = 0
Only used when the status
of the element is not OK.
RouteExists = 1
A route was found, and the corresponding information was filled out for the element.
RouteNotFound = 2
No route could be found. Fields containing route information, such as
distance_meters
or duration
, will not be filled out in the element.
Implementations§
Source§impl RouteMatrixElementCondition
impl RouteMatrixElementCondition
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true
if value
is a variant of RouteMatrixElementCondition
.
Sourcepub fn from_i32(value: i32) -> Option<RouteMatrixElementCondition>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<RouteMatrixElementCondition>
Converts an i32
to a RouteMatrixElementCondition
, or None
if value
is not a valid variant.
Source§impl RouteMatrixElementCondition
impl RouteMatrixElementCondition
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<RouteMatrixElementCondition>
pub fn from_str_name(value: &str) -> Option<RouteMatrixElementCondition>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for RouteMatrixElementCondition
impl Clone for RouteMatrixElementCondition
Source§fn clone(&self) -> RouteMatrixElementCondition
fn clone(&self) -> RouteMatrixElementCondition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RouteMatrixElementCondition
impl Debug for RouteMatrixElementCondition
Source§impl Default for RouteMatrixElementCondition
impl Default for RouteMatrixElementCondition
Source§fn default() -> RouteMatrixElementCondition
fn default() -> RouteMatrixElementCondition
Source§impl Hash for RouteMatrixElementCondition
impl Hash for RouteMatrixElementCondition
Source§impl Ord for RouteMatrixElementCondition
impl Ord for RouteMatrixElementCondition
Source§fn cmp(&self, other: &RouteMatrixElementCondition) -> Ordering
fn cmp(&self, other: &RouteMatrixElementCondition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for RouteMatrixElementCondition
impl PartialOrd for RouteMatrixElementCondition
Source§impl TryFrom<i32> for RouteMatrixElementCondition
impl TryFrom<i32> for RouteMatrixElementCondition
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<RouteMatrixElementCondition, UnknownEnumValue>
fn try_from(value: i32) -> Result<RouteMatrixElementCondition, UnknownEnumValue>
impl Copy for RouteMatrixElementCondition
impl Eq for RouteMatrixElementCondition
impl StructuralPartialEq for RouteMatrixElementCondition
Auto Trait Implementations§
impl Freeze for RouteMatrixElementCondition
impl RefUnwindSafe for RouteMatrixElementCondition
impl Send for RouteMatrixElementCondition
impl Sync for RouteMatrixElementCondition
impl Unpin for RouteMatrixElementCondition
impl UnwindSafe for RouteMatrixElementCondition
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