Trait gotham_restful::Resource
source · [−]pub trait Resource {
fn name() -> String;
fn setup<D: DrawResourceRoutes>(route: D);
}
Expand description
This trait must be implemented by every RESTful Resource. It will allow you to register the different methods for this Resource.
Required methods
fn setup<D: DrawResourceRoutes>(route: D)
fn setup<D: DrawResourceRoutes>(route: D)
Setup all routes of this resource. Take a look at the rest_resource! macro if you don’t feel like caring yourself.