[−][src]Struct browser_window::event::Event
Implementations
impl<'a, A> Event<'a, A>[src]
pub fn register<H>(&mut self, handler: H) where
H: FnMut(&A) + Send + 'a, [src]
H: FnMut(&A) + Send + 'a,
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]
H: FnMut(&A) -> F + Send + 'a,
F: Future<Output = ()> + 'a,
Register an 'async closure' to be invoked for this event.
Example
my_event.register_async(|args| async move { // Do something ... });
Trait Implementations
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]
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>,