pub trait ControllerRegistrant {
// Required methods
fn controller_name() -> &'static str;
fn controller_prefix() -> &'static str;
fn build_router(container: &Container) -> Result<Box<dyn Any + Send + Sync>>;
fn route_metadata() -> Box<dyn Any + Send + Sync>;
}Expand description
Type-erased controller descriptor used by feature crates to assemble HTTP routers.
Required Methods§
Sourcefn controller_name() -> &'static str
fn controller_name() -> &'static str
Returns the controller type name.
Sourcefn controller_prefix() -> &'static str
fn controller_prefix() -> &'static str
Returns the controller route prefix.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".