[][src]Enum smithy::types::WindowEvent

pub enum WindowEvent {
    OnBeforeUnload(BeforeUnloadEvent),
    OnHashChange(HashChangeEvent),
    OnPopState(PopStateEvent),
    OnUnhandledRejection(PromiseRejectionEvent),
}

An enum representing global events that can occur and that a smithy app can potentially handle.

Window events are included as part of the smd! syntax as follows:

smd!(
  window_event={window_event_handler};
)

e.g.

smd!(
  on_hash_change={|e: web_sys::HashChangeEvent| { /* ... */ }};
)

Variants

OnBeforeUnload(BeforeUnloadEvent)

Usage:

on_before_unload={|e: web_sys::BeforeUnloadEvent| { /* ... */ }};

Requires the before-unload-events feature.

OnHashChange(HashChangeEvent)

Usage:

on_hash_change={|e: web_sys::HashChangeEvent| { /* ... */ }};

Requires the hash-change-events feature.

OnPopState(PopStateEvent)

Usage:

on_pop_state={|e: web_sys::PopStateEvent| { /* ... */ }};

Requires the pop-state-events feature.

OnUnhandledRejection(PromiseRejectionEvent)

Usage:

on_unhandled_rejection={|e: web_sys::PromiseRejectionEvent| { /* ... */ }};

Requires the promise-rejection-events feature.

Auto Trait Implementations

impl !Send for WindowEvent

impl Unpin for WindowEvent

impl !Sync for WindowEvent

impl UnwindSafe for WindowEvent

impl RefUnwindSafe for WindowEvent

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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