pub struct SearchFilter { /* private fields */ }Expand description
A set of optional filters to exclude candidate edges based on their attribution.
Implementations§
Source§impl SearchFilter
impl SearchFilter
Sourcepub fn builder() -> Self
pub fn builder() -> Self
Creates a new instance of SearchFilter.
Sourcepub fn exclude_tunnel(self, exclude_tunnel: bool) -> Self
pub fn exclude_tunnel(self, exclude_tunnel: bool) -> Self
Whether to exclude roads marked as tunnels
Default: false
Sourcepub fn exclude_bridge(self, exclude_bridge: bool) -> Self
pub fn exclude_bridge(self, exclude_bridge: bool) -> Self
Whether to exclude roads marked as bridges
Default: false
Sourcepub fn exclude_toll(self, exclude_toll: bool) -> Self
pub fn exclude_toll(self, exclude_toll: bool) -> Self
Whether to exclude toll
Default: false
Sourcepub fn exclude_ferry(self, exclude_ferry: bool) -> Self
pub fn exclude_ferry(self, exclude_ferry: bool) -> Self
Whether to exclude ferry
Default: false
Sourcepub fn exclude_ramp(self, exclude_ramp: bool) -> Self
pub fn exclude_ramp(self, exclude_ramp: bool) -> Self
Whether to exclude link roads marked as ramps, note that some turn channels are also marked as ramps
Default: false
Sourcepub fn exclude_closures(self, exclude_closures: bool) -> Self
pub fn exclude_closures(self, exclude_closures: bool) -> Self
Whether to exclude roads considered closed due to live traffic closure.
Note:
- This option cannot be set if the costing option
ignore_closuresis also specified. - Ignoring closures at destination and source locations does NOT work for date_time type 0/1 & 2 respectively
Default: true
Sourcepub fn min_road_class(self, min_road_class: RoadClass) -> Self
pub fn min_road_class(self, min_road_class: RoadClass) -> Self
Lowest road class allowed
Default: RoadClass::ServiceOther
Sourcepub fn max_road_class(self, max_road_class: RoadClass) -> Self
pub fn max_road_class(self, max_road_class: RoadClass) -> Self
Highest road class allowed
Default: RoadClass::Motorway
Trait Implementations§
Source§impl Clone for SearchFilter
impl Clone for SearchFilter
Source§fn clone(&self) -> SearchFilter
fn clone(&self) -> SearchFilter
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 SearchFilter
impl Debug for SearchFilter
Source§impl Default for SearchFilter
impl Default for SearchFilter
Source§fn default() -> SearchFilter
fn default() -> SearchFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SearchFilter
impl<'de> Deserialize<'de> for SearchFilter
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
Auto Trait Implementations§
impl Freeze for SearchFilter
impl RefUnwindSafe for SearchFilter
impl Send for SearchFilter
impl Sync for SearchFilter
impl Unpin for SearchFilter
impl UnwindSafe for SearchFilter
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