Skip to main content

H1ConnectionResult

Enum H1ConnectionResult 

Source
#[non_exhaustive]
pub enum H1ConnectionResult<Transport> { Upgrade(Upgrade<Transport>), Close(H1Close<Transport>), Error(Error), }
Expand description

How an HTTP/1.x connection ended.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Upgrade(Upgrade<Transport>)

The connection negotiated an upgrade, which now owns the transport.

§

Close(H1Close<Transport>)

The connection is finished. Await the H1Close to close it gracefully, or drop it to hang up immediately.

§

Error(Error)

The connection ended with an error, such as a transport failure or a client that disconnected partway through a request.

Trait Implementations§

Source§

impl<Transport: Debug> Debug for H1ConnectionResult<Transport>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Transport> !RefUnwindSafe for H1ConnectionResult<Transport>

§

impl<Transport> !UnwindSafe for H1ConnectionResult<Transport>

§

impl<Transport> Freeze for H1ConnectionResult<Transport>
where Upgrade<Transport>: Freeze, H1Close<Transport>: Freeze,

§

impl<Transport> Send for H1ConnectionResult<Transport>
where Upgrade<Transport>: Send, H1Close<Transport>: Send,

§

impl<Transport> Sync for H1ConnectionResult<Transport>
where Upgrade<Transport>: Sync, H1Close<Transport>: Sync,

§

impl<Transport> Unpin for H1ConnectionResult<Transport>
where Upgrade<Transport>: Unpin, H1Close<Transport>: Unpin,

§

impl<Transport> UnsafeUnpin for H1ConnectionResult<Transport>
where Upgrade<Transport>: UnsafeUnpin, H1Close<Transport>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.