[][src]Trait tsukuyomi::output::Preset

pub trait Preset<T> {
    type Upgrade: Upgrade;
    type Error: Into<Error>;
    type Respond: Respond<Upgrade = Self::Upgrade, Error = Self::Error>;
    fn respond(this: T) -> Self::Respond;
}

A trait representing the preset for deriving the implementation of Responder.

Associated Types

type Upgrade: Upgrade

type Error: Into<Error>

type Respond: Respond<Upgrade = Self::Upgrade, Error = Self::Error>

Loading content...

Required methods

fn respond(this: T) -> Self::Respond

Loading content...

Implementors

impl<T> Preset<T> for Html where
    T: Into<ResponseBody>, 
[src]

type Upgrade = NeverUpgrade

type Error = Error

type Respond = HtmlRespond

impl<T> Preset<T> for Json where
    T: Serialize
[src]

type Upgrade = NeverUpgrade

type Error = Error

type Respond = JsonRespond<T>

impl<T> Preset<T> for JsonPretty where
    T: Serialize
[src]

type Upgrade = NeverUpgrade

type Error = Error

type Respond = JsonPrettyRespond<T>

Loading content...