[−][src]Struct web_extensions::EventListener
Implementations
impl<'a, F: ?Sized> EventListener<'a, F> where
F: WasmClosure,
[src]
F: WasmClosure,
pub fn new<L>(target: &'a EventTarget, callback: L) -> Self where
L: Unsize<F> + 'static,
[src]
L: Unsize<F> + 'static,
pub fn forget(self)
[src]
Keeps the EventListener
alive forever, so it will never be dropped.
This should only be used when you want the EventListener
to last forever, otherwise it will leak memory!
Trait Implementations
Auto Trait Implementations
impl<'a, F: ?Sized> RefUnwindSafe for EventListener<'a, F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<'a, F> !Send for EventListener<'a, F>
impl<'a, F> !Sync for EventListener<'a, F>
impl<'a, F: ?Sized> Unpin for EventListener<'a, F>
impl<'a, F: ?Sized> UnwindSafe for EventListener<'a, F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,