pub enum RoadClass {
Motorway,
Trunk,
Primary,
Secondary,
Tertiary,
Residential,
Unclassified,
Service,
LivingStreet,
Other,
}Expand description
The class of road an edge belongs to, from its OpenStreetMap highway tag.
A link (motorway_link) belongs to the class of the road it serves.
Variants§
Motorway
Trunk
Primary
Secondary
Tertiary
Residential
Unclassified
Service
LivingStreet
Other
Any other highway value, and edges built without one.
Implementations§
Source§impl RoadClass
impl RoadClass
Sourcepub fn from_highway(highway: &str) -> Self
pub fn from_highway(highway: &str) -> Self
The class of an OpenStreetMap highway value.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The class’s name as written in configuration: motorway, living_street, other.
Sourcepub fn parse(name: &str) -> Option<Self>
pub fn parse(name: &str) -> Option<Self>
The class named name (RoadClass::as_str), if any.
Trait Implementations§
impl Copy for RoadClass
Source§impl<'de> Deserialize<'de> for RoadClass
impl<'de> Deserialize<'de> for RoadClass
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 RoadClass
impl StructuralPartialEq for RoadClass
Auto Trait Implementations§
impl Forget for RoadClass
impl Freeze for RoadClass
impl Move for RoadClass
impl RefUnwindSafe for RoadClass
impl Send for RoadClass
impl Sync for RoadClass
impl Unpin for RoadClass
impl UnsafeUnpin for RoadClass
impl UnwindSafe for RoadClass
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