[][src]Trait typed_html::events::EventHandler

pub trait EventHandler<T: OutputType, E> {
    fn attach(&mut self, target: &mut T::EventTarget) -> T::EventListenerHandle;
fn render(&self) -> Option<String>; }

Trait for event handlers.

Required methods

fn attach(&mut self, target: &mut T::EventTarget) -> T::EventListenerHandle

Build a callback function from this event handler.

Returns None is this event handler can't be used to build a callback function. This is usually the case if the event handler is a string intended for server side rendering.

fn render(&self) -> Option<String>

Render this event handler as a string.

Returns None if this event handler cannot be rendered. Normally, the only event handlers that can be rendered are string values intended for server side rendering.

Loading content...

Implementations on Foreign Types

impl EventHandler<String, StringEvent> for &'static str[src]

impl EventHandler<String, StringEvent> for String[src]

Loading content...

Implementors

Loading content...