pub struct WebSocketUpgrader<S, E> { /* private fields */ }
Expand description

Represents a client connection that has been accepted and the upgrade request validated. This may be used to validate the request by a user and opt to either continue the upgrade or reject the connection - such as if the target path does not exist.

Implementations

The subprotocol that the client has requested.

The URI that the client has requested.

The original request that the client sent.

Attempt to upgrade this to a fully negotiated WebSocket connection.

Errors

Errors if there is an IO error.

Insert headers into the response and attempt to upgrade this to a fully negotiated WebSocket connection.

Errors

Errors if there is an IO error.

Reject this connection with the response provided.

Errors

Errors if there is an IO error.

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.