pub trait UseRouter {
// Required methods
fn router(&self) -> &GlobalRouter;
fn update_router<F, R>(&mut self, f: F) -> R
where F: FnOnce(&mut GlobalRouter, &mut App) -> R;
}Expand description
Trait for accessing the global router from context
Required Methods§
Sourcefn router(&self) -> &GlobalRouter
fn router(&self) -> &GlobalRouter
Get reference to global router
Sourcefn update_router<F, R>(&mut self, f: F) -> R
fn update_router<F, R>(&mut self, f: F) -> R
Update global router
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.