Enum serv::reply::ServiceReply

source ·
pub enum ServiceReply<T: Serialize, E> {
    Ok {
        result: T,
    },
    Err {
        reason: String,
        msg: Option<String>,
        _e: E,
    },
}

Variants§

§

Ok

Fields

§result: T
§

Err

Fields

§reason: String
§_e: E

Trait Implementations§

Converts to this type from the input type.
Converts to this type from the input type.
write reply body
serv_state build HyperService with given function F and state S.
service builds HyperService with given function F.
serv_state builds HyperService with given function F and state S.
serv build HyperService with given function F.
Serialize this value into the given Serde serializer. Read more

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
Converts to this type from the input type.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.