pub trait RouterExt {
type State: StateInterface;
// Required method
fn routes() -> RouteCollection<Self::State>;
// Provided methods
fn router(self) -> Self
where Self: Sized { ... }
fn routes_with_state(_: &State<Self::State>) -> RouteCollection<Self::State> { ... }
fn router_collection() -> RouteCollection<Self::State> { ... }
}
Required Associated Types§
type State: StateInterface
Required Methods§
fn routes() -> RouteCollection<Self::State>
Provided Methods§
fn router(self) -> Selfwhere
Self: Sized,
fn routes_with_state(_: &State<Self::State>) -> RouteCollection<Self::State>
fn router_collection() -> RouteCollection<Self::State>
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.