Struct map_model::pathfind::pathfinder::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§
source§impl 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 Freeze for PathfinderCache
impl RefUnwindSafe for PathfinderCache
impl Send for PathfinderCache
impl Sync for PathfinderCache
impl Unpin for PathfinderCache
impl UnwindSafe for PathfinderCache
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