Trait gotham_restful::ResourceResult
source · [−]pub trait ResourceResult {
fn into_response(self) -> Result<Response, SerdeJsonError>;
fn schema() -> OpenapiSchema;
fn accepted_types() -> Option<Vec<Mime>> { ... }
fn default_status() -> StatusCode { ... }
}
Expand description
A trait provided to convert a resource’s result to json.
Required methods
fn into_response(self) -> Result<Response, SerdeJsonError>
fn into_response(self) -> Result<Response, SerdeJsonError>
Turn this into a response that can be returned to the browser. This api will likely change in the future.
fn schema() -> OpenapiSchema
Provided methods
fn accepted_types() -> Option<Vec<Mime>>
fn accepted_types() -> Option<Vec<Mime>>
Return a list of supported mime types.