[−][src]Trait moving_gc_arena::traverse::Strategy
A Strategy allows for controlling the method and order for mark-based traversals.
While for a standard depth-first-search, the CallStack strategy is sufficient, this is vulnerable to stack overflows, and does not allow traversals in anything other than the order given by HasIx::foreach_ix
Required methods
pub fn run<'a, F, V>(
&self,
get_next: &mut F,
visitor: &mut V,
start: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, State>,
[src]
&self,
get_next: &mut F,
visitor: &mut V,
start: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, State>,
Runs the traversal for a given starting point and function to get next entries by index. Should visit a corresponding state of the visitor for each entry.
This should run the entire traversal. The state needed for that may be stored in any way possible.
Implementors
impl<T: 'static + HasIx<T>> Strategy<T, PreAndPost> for CallStack
[src]
pub fn run<'a, F, V>(
&self,
get_next: &mut F,
visitor: &mut V,
next: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, PreAndPost>,
[src]
&self,
get_next: &mut F,
visitor: &mut V,
next: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, PreAndPost>,
impl<T: 'static + HasIx<T>> Strategy<T, PreOnly> for CallStack
[src]
pub fn run<'a, F, V>(
&self,
get_next: &mut F,
visitor: &mut V,
next: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, PreOnly>,
[src]
&self,
get_next: &mut F,
visitor: &mut V,
next: Entry<'_, T>
) where
F: FnMut(Ix<T>) -> Option<Entry<'a, T>>,
V: Visitor<T, PreOnly>,