[−][src]Trait izanami_http::upgrade::HttpUpgrade
A trait that represents HTTP protocol upgrade.
Associated Types
type Upgraded: Connection<Error = Self::Error>
The type of asynchronous process that drives upgraded protocol.
type Error
The error type that will be returned from the upgraded stream.
Required methods
fn upgrade(self, stream: I) -> Result<Self::Upgraded, I>
Upgrades the specified stream to another protocol.
When the value cannot upgrade the stream, the implementation
of this method should return a Err(stream)
to properly shut
down the stream.
Implementors
impl<Bd, I> HttpUpgrade<I> for Bd where
Bd: BufStream,
[src]
Bd: BufStream,
type Upgraded = Empty<(), Error>
type Error = Error
fn upgrade(self, stream: I) -> Result<Self::Upgraded, I>
[src]
impl<I> HttpUpgrade<I> for Body
[src]
type Upgraded = Empty<(), Self::Error>
type Error = Error
fn upgrade(self, stream: I) -> Result<Self::Upgraded, I>
[src]
impl<T, I> HttpUpgrade<I> for NoUpgrade<T> where
T: HttpBody,
[src]
T: HttpBody,
type Upgraded = Empty<(), Error>
type Error = Error
fn upgrade(self, stream: I) -> Result<Self::Upgraded, I>
[src]
impl<T, U, I> HttpUpgrade<I> for MaybeUpgrade<T, U> where
T: HttpBody,
U: HttpUpgrade<I>,
[src]
T: HttpBody,
U: HttpUpgrade<I>,