Skip to main content

Informational

Struct Informational 

Source
pub struct Informational<'a> {
    pub id: ConnectionId,
    pub status: StatusCode,
    pub headers: &'a HeaderMap,
}
Expand description

A 1xx that arrived before the response.

§Why there is no version here, when Head has one

A 1xx travels on a connection, and the connection’s protocol was already reported by the Connected or Reused that opened this exchange — both of which carry a plain Version rather than an Option, because only a transport that owns a connection emits either and owning one means having negotiated its protocol. Repeating it here would be a third place to be wrong about the same fact.

Head::version is an Option for the opposite reason: the two backends that own no connection emit Head and nothing else, so for them there is no Connected to have carried it. Neither of them can emit this event at all.

Fields§

§id: ConnectionId§status: StatusCode

1xx. Which one is the whole of what distinguishes a 100 from a 103, so it is not narrowed to an enum: a status this crate has never heard of is still a status the server sent.

§headers: &'a HeaderMap

Trait Implementations§

Source§

impl<'a> Debug for Informational<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Informational<'a>

§

impl<'a> RefUnwindSafe for Informational<'a>

§

impl<'a> Send for Informational<'a>

§

impl<'a> Sync for Informational<'a>

§

impl<'a> Unpin for Informational<'a>

§

impl<'a> UnsafeUnpin for Informational<'a>

§

impl<'a> UnwindSafe for Informational<'a>

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.