Trait gotham_restful::ResourceWithSchema
source · pub trait ResourceWithSchema {
// Required method
fn setup<D: DrawResourceRoutesWithSchema>(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§
sourcefn setup<D: DrawResourceRoutesWithSchema>(route: D)
fn setup<D: DrawResourceRoutesWithSchema>(route: D)
Register all methods handled by this resource with the underlying router.
Object Safety§
This trait is not object safe.