pub struct FilterHeuristic<F>(pub F);Expand description
Chooses whether to enter a path or not.
Wrap a type with the bound F: FnMut(bool) -> bool + Clone and
this will implement Heuristic. The function will be cloned
internally so that from the function’s point of view it is being called
in the order it descends in. It is passed the side that is being entered
and returns whether or not it would like to enter.
This is useful when looking for items with a discrete distance.
Tuple Fields§
§0: FTrait Implementations§
Source§impl<F: Clone> Clone for FilterHeuristic<F>
impl<F: Clone> Clone for FilterHeuristic<F>
Source§fn clone(&self) -> FilterHeuristic<F>
fn clone(&self) -> FilterHeuristic<F>
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 moreAuto Trait Implementations§
impl<F> Freeze for FilterHeuristic<F>where
F: Freeze,
impl<F> RefUnwindSafe for FilterHeuristic<F>where
F: RefUnwindSafe,
impl<F> Send for FilterHeuristic<F>where
F: Send,
impl<F> Sync for FilterHeuristic<F>where
F: Sync,
impl<F> Unpin for FilterHeuristic<F>where
F: Unpin,
impl<F> UnwindSafe for FilterHeuristic<F>where
F: UnwindSafe,
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