Trait Handler

Source
pub trait Handler: 'static {
    // Provided method
    fn handle(&mut self, window: Window, message: &str) { ... }
}
Expand description

An event handler; you probably want to implement one.

  • When the webpage calls window.tether, the message is passed to handle.
  • The handler is dropped when the window is closed.

Provided Methods§

Source

fn handle(&mut self, window: Window, message: &str)

The webpage called window.tether with the given string.

Implementors§

Source§

impl<F: FnMut(Window, &str) + 'static> Handler for F