pub struct Listener<Ms: Clone> {
pub trigger: String,
pub handler: Option<Box<dyn FnMut(Event) -> Ms>>,
pub closure: Option<Closure<dyn FnMut(Event)>>,
}
Expand description
Event-handling for Elements
Fields
trigger: String
handler: Option<Box<dyn FnMut(Event) -> Ms>>
closure: Option<Closure<dyn FnMut(Event)>>
Implementations
Trait Implementations
Auto Trait Implementations
impl<Ms> !RefUnwindSafe for Listener<Ms>
impl<Ms> !Send for Listener<Ms>
impl<Ms> !Sync for Listener<Ms>
impl<Ms> Unpin for Listener<Ms>
impl<Ms> !UnwindSafe for Listener<Ms>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more