Trait gotham_restful::Resource
source · [−]pub trait Resource {
fn setup<D: DrawResourceRoutes>(route: D);
}
Expand description
This trait must be implemented for every resource. It allows you to register the different methods that can be handled by this resource to be registered with the underlying router.
It is not recommended to implement this yourself, rather just use #[derive(Resource)]
.
Required methods
fn setup<D: DrawResourceRoutes>(route: D)
fn setup<D: DrawResourceRoutes>(route: D)
Register all methods handled by this resource with the underlying router.