pub enum ServerResponse {
    Accepted {
        protocol: Option<String>,
    },
    Redirect {
        status_code: u16,
        location: String,
    },
    Rejected {
        status_code: u16,
    },
}
Expand description

Handshake response received from the server.

Variants§

§

Accepted

Fields

§protocol: Option<String>

The protocol (if any) the server has selected.

The server has accepted our request.

§

Redirect

Fields

§status_code: u16

The HTTP response status code.

§location: String

The location URL we should go to.

The server is redirecting us to some other location.

§

Rejected

Fields

§status_code: u16

HTTP response status code.

The server rejected our request.

Trait Implementations§

Formats the value using the given formatter. 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

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
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.