Skip to main content

Controller

Trait Controller 

Source
pub trait Controller {
    // Required methods
    fn base_path() -> &'static str;
    fn register_routes(cfg: &mut dyn Any);

    // Provided method
    fn routes() -> &'static [RouteDef] { ... }
}

Required Methods§

Source

fn base_path() -> &'static str

Source

fn register_routes(cfg: &mut dyn Any)

Provided Methods§

Source

fn routes() -> &'static [RouteDef]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§