pub enum TravelMode {
Car,
Bicycle,
Foot,
}Expand description
How a network is travelled: by car (the default), by bicycle or on foot. Each mode reads its own roads and paths from OpenStreetMap, follows its own access and one-way rules, and is cached on its own.
Variants§
Implementations§
Source§impl TravelMode
impl TravelMode
Sourcepub const ALL: [TravelMode; 3]
pub const ALL: [TravelMode; 3]
Every mode.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The mode’s name as written in configuration: car, bicycle, foot.
Sourcepub fn parse(name: &str) -> Option<Self>
pub fn parse(name: &str) -> Option<Self>
The mode named name (TravelMode::as_str), if any.
Sourcepub fn highway_types(self) -> Option<Vec<&'static str>>
pub fn highway_types(self) -> Option<Vec<&'static str>>
The highway values a bicycle or a walker may use. A car uses
NetworkConfig::highway_types.
Trait Implementations§
Source§impl Clone for TravelMode
impl Clone for TravelMode
impl Copy for TravelMode
Source§impl Debug for TravelMode
impl Debug for TravelMode
Source§impl Default for TravelMode
impl Default for TravelMode
Source§impl<'de> Deserialize<'de> for TravelMode
impl<'de> Deserialize<'de> for TravelMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TravelMode
Source§impl Hash for TravelMode
impl Hash for TravelMode
Source§impl PartialEq for TravelMode
impl PartialEq for TravelMode
Source§impl Serialize for TravelMode
impl Serialize for TravelMode
impl StructuralPartialEq for TravelMode
Auto Trait Implementations§
impl Forget for TravelMode
impl Freeze for TravelMode
impl Move for TravelMode
impl RefUnwindSafe for TravelMode
impl Send for TravelMode
impl Sync for TravelMode
impl Unpin for TravelMode
impl UnsafeUnpin for TravelMode
impl UnwindSafe for TravelMode
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more