pub struct RouteOptions {
pub algorithm: RoutingAlgorithm,
pub turn_restrictions: Vec<TurnRestriction>,
pub avoid_tolls: bool,
pub avoid_highways: bool,
pub max_detour_factor: Option<f64>,
pub criteria: RoutingCriteria,
pub turn_penalties: Option<TurnPenalties>,
pub alternatives: usize,
pub alternative_overlap_threshold: f64,
pub via_points: Vec<NodeId>,
}Expand description
Routing options
Fields§
§algorithm: RoutingAlgorithmRouting algorithm
turn_restrictions: Vec<TurnRestriction>Turn restrictions
avoid_tolls: boolAvoid toll roads
avoid_highways: boolAvoid highways
max_detour_factor: Option<f64>Maximum detour factor (e.g., 1.2 = 20% longer than straight line)
criteria: RoutingCriteriaMulti-criteria routing weights
turn_penalties: Option<TurnPenalties>Turn penalties
alternatives: usizeNumber of alternative routes to generate
alternative_overlap_threshold: f64Alternative route overlap threshold (0.0 to 1.0, lower = more distinct)
via_points: Vec<NodeId>Via points (mandatory intermediate stops, in order)
Trait Implementations§
Source§impl Clone for RouteOptions
impl Clone for RouteOptions
Source§fn clone(&self) -> RouteOptions
fn clone(&self) -> RouteOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RouteOptions
impl Debug for RouteOptions
Auto Trait Implementations§
impl Freeze for RouteOptions
impl RefUnwindSafe for RouteOptions
impl Send for RouteOptions
impl Sync for RouteOptions
impl Unpin for RouteOptions
impl UnsafeUnpin for RouteOptions
impl UnwindSafe for RouteOptions
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