Trait cursive::view::Finder
[−]
[src]
pub trait Finder { fn find<V: View + Any>(&mut self, sel: &Selector) -> Option<&mut V>; fn find_id<V: View + Any>(&mut self, id: &str) -> Option<&mut V> { ... } }
Provides find<V: View>
to views.
This trait is mostly a wrapper around View::find_any
.
It provides a nicer interface to find a view when you know its type.
Required Methods
fn find<V: View + Any>(&mut self, sel: &Selector) -> Option<&mut V>
Tries to find the view pointed to by the given selector.
If the view is not found, or if it is not of the asked type, it returns None.
Provided Methods
fn find_id<V: View + Any>(&mut self, id: &str) -> Option<&mut V>
Convenient method to use find
with a view::Selector::Id
.
Implementors
impl<T: View> Finder for T