Trait saphir::controller::Controller
source · pub trait Controller {
const BASE_PATH: &'static str;
// Required method
fn handlers(&self) -> Vec<ControllerEndpoint<Self>>
where Self: Sized;
}
Expand description
Trait that defines how a controller handles its requests
Required Associated Constants§
Required Methods§
sourcefn handlers(&self) -> Vec<ControllerEndpoint<Self>>where
Self: Sized,
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