Struct cursive::event::Callback [−][src]
pub struct Callback(_);
Callback is a function that can be triggered by an event. It has a mutable access to the cursive root.
Methods
impl Callback
[src]
impl Callback
pub fn from_fn<F>(f: F) -> Self where
F: 'static + Fn(&mut Cursive),
[src]
pub fn from_fn<F>(f: F) -> Self where
F: 'static + Fn(&mut Cursive),
Wraps the given function into a Callback
object.
pub fn from_fn_mut<F>(f: F) -> Self where
F: 'static + FnMut(&mut Cursive),
[src]
pub fn from_fn_mut<F>(f: F) -> Self where
F: 'static + FnMut(&mut Cursive),
Wrap a FnMut
into a Callback
object.
If this methods tries to call itself, nested calls will be no-ops.
pub fn dummy() -> Self
[src]
pub fn dummy() -> Self
Returns a dummy callback that doesn't run anything.
Methods from Deref<Target = Box<Fn(&mut Cursive)>>
Trait Implementations
impl Clone for Callback
[src]
impl Clone for Callback
fn clone(&self) -> Callback
[src]
fn clone(&self) -> Callback
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Deref for Callback
[src]
impl Deref for Callback
type Target = Box<Fn(&mut Cursive)>
The resulting type after dereferencing.
ⓘImportant traits for Box<R>fn deref<'a>(&'a self) -> &'a Box<Fn(&mut Cursive)>
[src]
ⓘImportant traits for Box<R>
fn deref<'a>(&'a self) -> &'a Box<Fn(&mut Cursive)>
Dereferences the value.
impl From<Rc<Box<Fn(&mut Cursive)>>> for Callback
[src]
impl From<Rc<Box<Fn(&mut Cursive)>>> for Callback
impl From<Box<Fn(&mut Cursive) + Send>> for Callback
[src]
impl From<Box<Fn(&mut Cursive) + Send>> for Callback
impl From<Box<Fn(&mut Cursive)>> for Callback
[src]
impl From<Box<Fn(&mut Cursive)>> for Callback