Trait Integration

Source
pub trait Integration {
    // Required methods
    fn current_pathname(&self) -> String;
    fn on_popstate(&self, f: Box<dyn FnMut()>);
    fn click_handler(&self) -> Box<dyn Fn(MouseEvent)>;
}
Expand description

A router integration provides the methods for adapting a router to a certain environment (e.g. history API).

Required Methods§

Source

fn current_pathname(&self) -> String

Get the current pathname.

Source

fn on_popstate(&self, f: Box<dyn FnMut()>)

Add a callback for listening to the popstate event.

Source

fn click_handler(&self) -> Box<dyn Fn(MouseEvent)>

Get the click handler that is run when links are clicked.

Implementors§