[][src]Trait saphir::controller::Controller

pub trait Controller {
    const BASE_PATH: &'static str;

    fn handlers(&self) -> Vec<ControllerEndpoint<Self>>
    where
        Self: Sized
; }

Trait that defines how a controller handles its requests

Associated Constants

const BASE_PATH: &'static str

Defines the base path from which requests are to be handled by this controller

Loading content...

Required methods

fn handlers(&self) -> Vec<ControllerEndpoint<Self>> where
    Self: Sized

Returns a list of ControllerEndpoint

Each ControllerEndpoint is then added to the router, which will dispatch requests accordingly

Loading content...

Implementors

Loading content...