pub enum ManeuverType {
Departure,
Arrival,
Continue,
Turn(TurnDirection),
Merge,
OnRamp,
OffRamp,
Fork,
Roundabout(u8),
Ferry,
}Expand description
High-level maneuver classification carried by a route step.
The classification serializes as its Self::stable_label — the single
maneuver spelling across the SDK (the FFI route records carry the same
labels, and the recorded trace fixtures speak them) — so a route fixture
written from Rust and a foreign route record rebuilt from it cannot
disagree on spelling.
Variants§
Departure
Route start.
Arrival
Route end.
Continue
Road-name or road-class change without a turn.
Turn(TurnDirection)
Left/right/slight/sharp turn, see TurnDirection.
Merge
Merge onto another road.
OnRamp
Motorway on-ramp.
OffRamp
Motorway off-ramp.
Fork
Fork in the road.
Roundabout(u8)
Roundabout traversal; carries the exit index starting at one.
Ferry
Transition to a ferry.
Implementations§
Source§impl ManeuverType
impl ManeuverType
Sourcepub fn stable_label(&self) -> String
pub fn stable_label(&self) -> String
The stable snake-case label of this maneuver: departure,
turn-left, roundabout-2, …. This is the SDK’s single maneuver
spelling — the FFI route records carry it and the serde
serialization emits it.
Sourcepub fn from_stable_label(stable_label: &str) -> Option<Self>
pub fn from_stable_label(stable_label: &str) -> Option<Self>
Builds the maneuver a stable label (see Self::stable_label) names;
None for unknown or malformed labels — refused, never guessed.
Trait Implementations§
Source§impl Clone for ManeuverType
impl Clone for ManeuverType
Source§fn clone(&self) -> ManeuverType
fn clone(&self) -> ManeuverType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ManeuverType
Source§impl Debug for ManeuverType
impl Debug for ManeuverType
Source§impl<'de> Deserialize<'de> for ManeuverType
Manoeuvres deserialize from their stable label; any other form is a
decoding error, not a guess.
impl<'de> Deserialize<'de> for ManeuverType
Manoeuvres deserialize from their stable label; any other form is a decoding error, not a guess.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl Eq for ManeuverType
Source§impl Hash for ManeuverType
impl Hash for ManeuverType
Source§impl PartialEq for ManeuverType
impl PartialEq for ManeuverType
Source§impl Serialize for ManeuverType
Manoeuvres serialize as their stable label.
impl Serialize for ManeuverType
Manoeuvres serialize as their stable label.