Skip to main content

TreeFilter

Trait TreeFilter 

Source
pub trait TreeFilter<T: TreeModel> {
    // Required method
    fn is_match(&self, model: &T, id: T::Id) -> bool;
}
Expand description

A node visibility filter.

Required Methods§

Source

fn is_match(&self, model: &T, id: T::Id) -> bool

Returns true when the node directly matches the filter.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T, F> TreeFilter<T> for F
where T: TreeModel, F: Fn(&T, T::Id) -> bool,

Source§

impl<T: TreeModel> TreeFilter<T> for NoFilter