Struct map_model::PathfinderCache
source · [−]pub struct PathfinderCache {
cache: VecMap<(PathConstraints, RoutingParams), Pathfinder>,
}
Expand description
For callers needing to request paths with a variety of RoutingParams. The caller is in charge of the lifetime, so they can clear it out when appropriate.
Fields
cache: VecMap<(PathConstraints, RoutingParams), Pathfinder>
Implementations
sourceimpl PathfinderCache
impl PathfinderCache
pub fn new() -> Self
sourcepub fn pathfind_with_params(
&mut self,
map: &Map,
req: PathRequest,
params: RoutingParams
) -> Option<PathV2>
pub fn pathfind_with_params(
&mut self,
map: &Map,
req: PathRequest,
params: RoutingParams
) -> Option<PathV2>
New pathfinders will be created as-needed using Dijkstra’s, no spammy logging
Auto Trait Implementations
impl RefUnwindSafe for PathfinderCache
impl Send for PathfinderCache
impl Sync for PathfinderCache
impl Unpin for PathfinderCache
impl UnwindSafe for PathfinderCache
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self