pub struct Callback(/* private fields */);Expand description
Callback is a function that can be triggered by an event. It has a mutable access to the cursive root.
It is meant to be stored in views.
Implementations§
Source§impl Callback
 
impl Callback
Sourcepub fn from_fn_mut<F>(f: F) -> Self
 
pub fn from_fn_mut<F>(f: F) -> Self
Wrap a FnMut into a Callback object.
If this methods tries to call itself, nested calls will be no-ops.
Sourcepub fn from_fn_once<F>(f: F) -> Self
 
pub fn from_fn_once<F>(f: F) -> Self
Wrap a FnOnce into a Callback object.
After being called once, the callback will become a no-op.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Callback
impl !RefUnwindSafe for Callback
impl Send for Callback
impl Sync for Callback
impl Unpin for Callback
impl !UnwindSafe for Callback
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more