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§
Sourcefn current_pathname(&self) -> String
fn current_pathname(&self) -> String
Get the current pathname.
Sourcefn on_popstate(&self, f: Box<dyn FnMut()>)
fn on_popstate(&self, f: Box<dyn FnMut()>)
Add a callback for listening to the popstate
event.
Sourcefn click_handler(&self) -> Box<dyn Fn(MouseEvent)>
fn click_handler(&self) -> Box<dyn Fn(MouseEvent)>
Get the click handler that is run when links are clicked.