Skip to main content

WeakRcRefCellEventListenerExt

Trait WeakRcRefCellEventListenerExt 

Source
pub trait WeakRcRefCellEventListenerExt<T> {
    // Required method
    fn event_listener<F>(
        &self,
        target: &EventTarget,
        event_type: impl Into<Cow<'static, str>>,
        callback: F,
    ) -> EventListener
       where F: FnMut(&mut T, &Event) + 'static;
}

Required Methods§

Source

fn event_listener<F>( &self, target: &EventTarget, event_type: impl Into<Cow<'static, str>>, callback: F, ) -> EventListener
where F: FnMut(&mut T, &Event) + 'static,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T: 'static> WeakRcRefCellEventListenerExt<T> for Weak<RefCell<T>>

Source§

fn event_listener<F>( &self, target: &EventTarget, event_type: impl Into<Cow<'static, str>>, callback: F, ) -> EventListener
where F: FnMut(&mut T, &Event) + 'static,

Implementors§