zng::widget::info::iter

Trait TreeIterator

source
pub trait TreeIterator:
    InternalTreeIterator
    + Iterator<Item = WidgetInfo>
    + FusedIterator {
    // Provided methods
    fn tree_filter<F>(self, filter: F) -> TreeFilterIter<Self, F> 
       where Self: Sized,
             F: FnMut(&WidgetInfo) -> TreeFilter { ... }
    fn tree_find<F>(self, filter: F) -> Option<WidgetInfo>
       where Self: Sized,
             F: FnMut(&WidgetInfo) -> TreeFilter { ... }
    fn tree_any<F>(self, filter: F) -> bool
       where Self: Sized,
             F: FnMut(&WidgetInfo) -> TreeFilter { ... }
}
Expand description

Iterator that traverses the branches of a widget tree.

Provided Methods§

source

fn tree_filter<F>(self, filter: F) -> TreeFilterIter<Self, F>
where Self: Sized, F: FnMut(&WidgetInfo) -> TreeFilter,

Creates an iterator which uses a closure to filter items or branches at a time.

See TreeFilter for details.

source

fn tree_find<F>(self, filter: F) -> Option<WidgetInfo>
where Self: Sized, F: FnMut(&WidgetInfo) -> TreeFilter,

Gets the first item not filtered out by a TreeFilter closure.

source

fn tree_any<F>(self, filter: F) -> bool
where Self: Sized, F: FnMut(&WidgetInfo) -> TreeFilter,

Check if any item is not filtered out by a TreeFilter closure.

Implementors§