Struct seamless::handler::response::ToJson[][src]

pub struct ToJson<T: ApiBody>(pub T);
Expand description

Wrap responses in this to return them as JSON

Tuple Fields

0: T

Trait Implementations

This returns information about the shape of the type and description of parts of it.

Serialize the type to JSON.

Serialize the type to a serde_json::Value.

Deserialize from bytes containing a JSON value.

Deserialize from a serde_json::Value.

The type that we should look at to work out what the response body will look like.

This describes how the type can be converted into an http::Response.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.