[][src]Struct browser_window::event::Event

pub struct Event<'a, A> { /* fields omitted */ }

Implementations

impl<'a, A> Event<'a, A>[src]

pub fn register<H>(&mut self, handler: H) where
    H: FnMut(&A) + Send + 'a, 
[src]

Register a closure to be invoked for this event.

pub fn register_async<H, F>(&mut self, handler: H) where
    H: FnMut(&A) -> F + Send + 'a,
    F: Future<Output = ()> + 'a, 
[src]

Register an 'async closure' to be invoked for this event.

Example

my_event.register_async(|args| async move {
    // Do something ...
});

Trait Implementations

impl<'a, A> Default for Event<'a, A>[src]

Auto Trait Implementations

impl<'a, A> !RefUnwindSafe for Event<'a, A>

impl<'a, A> Send for Event<'a, A>

impl<'a, A> !Sync for Event<'a, A>

impl<'a, A> Unpin for Event<'a, A>

impl<'a, A> !UnwindSafe for Event<'a, A>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.