Enum hyper::server::UpgradableResponse [] [src]

pub enum UpgradableResponse<P = (), B = Body> {
    Response(Response<B>),
    Upgrade(P, Option<Response<()>>),
}

Either an HTTP response or a signal to upgrade from HTTP to another protocol.

If the latter, the Upgrade variant should contain information pertaining to this protocol switch.

Variants

An HTTP response.

A protocol upgrade signal with accompanying information and optional "switching protocols" HTTP response head.

Trait Implementations

impl<B, P> Into<Message<Result<__ProtoResponse, (P, Option<__ProtoResponse>)>, B>> for UpgradableResponse<P, B>
[src]

[src]

Performs the conversion.

impl<P, B> Debug for UpgradableResponse<P, B> where
    Response<B>: Debug,
    P: Debug
[src]

[src]

Formats the value using the given formatter.

impl<P, B> From<Response<B>> for UpgradableResponse<P, B>
[src]

[src]

Performs the conversion.

impl<P, B> Default for UpgradableResponse<P, B>
[src]

[src]

Returns the "default value" for a type. Read more