pub trait Resource {
    // Required method
    fn setup<D: DrawResourceRoutes>(route: D);
}
Expand description

This trait must be implemented for every resource. It allows you to register the different endpoints that can be handled by this resource to be registered with the underlying router.

It is not recommended to implement this yourself, just use #[derive(Resource)].

Required Methods§

source

fn setup<D: DrawResourceRoutes>(route: D)

Register all methods handled by this resource with the underlying router.

Implementors§