Skip to main content

Respond

Trait Respond 

Source
pub trait Respond<R> {
    type Output;

    // Required method
    fn respond(response: R) -> Self::Output;
}
Expand description

A method which can be responded to with a single value.

For methods which return a result, this method implicitly returns Ok of the given response.

Required Associated Types§

Source

type Output

The returned response type.

Required Methods§

Source

fn respond(response: R) -> Self::Output

Makes a response from the given input.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§