pub trait Visitor<'a, const N: usize, K> {
// Required method
fn visit_node(&mut self, node: &'a Node<N, K>) -> bool;
// Provided methods
fn pre_visit_node(&mut self, node: &'a Node<N, K>) -> bool { ... }
fn post_visit_node(&mut self, node: &'a Node<N, K>) -> bool { ... }
fn visit_page(&mut self, page: &'a Page<N, K>, high_page: bool) -> bool { ... }
fn post_visit_page(&mut self, page: &'a Page<N, K>) -> bool { ... }
}Required Methods§
Sourcefn visit_node(&mut self, node: &'a Node<N, K>) -> bool
fn visit_node(&mut self, node: &'a Node<N, K>) -> bool
Visit the given Node.
Provided Methods§
Sourcefn pre_visit_node(&mut self, node: &'a Node<N, K>) -> bool
fn pre_visit_node(&mut self, node: &'a Node<N, K>) -> bool
Called before a a call to Visitor::visit_node() with the same
Node.
By default this is a no-op unless implemented.
Sourcefn post_visit_node(&mut self, node: &'a Node<N, K>) -> bool
fn post_visit_node(&mut self, node: &'a Node<N, K>) -> bool
Called after Visitor::visit_node() with the same Node.
By default this is a no-op unless implemented.
Sourcefn visit_page(&mut self, page: &'a Page<N, K>, high_page: bool) -> bool
fn visit_page(&mut self, page: &'a Page<N, K>, high_page: bool) -> bool
Visit the given Page, which was referenced via a high-page link if
high_page is true.
By default this is a no-op unless implemented.
Sourcefn post_visit_page(&mut self, page: &'a Page<N, K>) -> bool
fn post_visit_page(&mut self, page: &'a Page<N, K>) -> bool
Called after Visitor::visit_page() with the same Page.
By default this is a no-op unless implemented.