Skip to main content

IntoActionResponse

Trait IntoActionResponse 

Source
pub trait IntoActionResponse {
    // Required method
    fn into_action_response(self) -> Response;
}
Expand description

Lets a #[controller] action body evaluate to either a Response or a Result<Response, E>. The macro wraps every action body in into_action_response(), so actions can use ? for fallible work (DB calls, body parsing) and an Err becomes a 500 response.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoActionResponse for Response

Source§

impl<E: Display> IntoActionResponse for Result<Response, E>

Implementors§