Trait sycamore_router::Integration [−][src]
pub trait Integration {
fn current_pathname(&self) -> String;
fn on_popstate(&self, f: Box<dyn FnMut()>);
fn click_handler(&self) -> Box<EventHandler>;
}
Expand description
A router integration provides the methods for adapting a router to a certain environment (e.g. history API).
Required methods
fn current_pathname(&self) -> String
fn current_pathname(&self) -> String
Get the current pathname.
fn on_popstate(&self, f: Box<dyn FnMut()>)
fn on_popstate(&self, f: Box<dyn FnMut()>)
Add a callback for listening to the popstate
event.
fn click_handler(&self) -> Box<EventHandler>
fn click_handler(&self) -> Box<EventHandler>
Get the click handler that is run when links are clicked.