Struct hyper::proto::h1::conn::State

source ·
struct State {
Show 17 fields allow_half_close: bool, cached_headers: Option<HeaderMap>, error: Option<Error>, keep_alive: KA, method: Option<Method>, h1_parser_config: ParserConfig, h1_header_read_timeout: Option<Duration>, h1_header_read_timeout_fut: Option<Pin<Box<Sleep>>>, h1_header_read_timeout_running: bool, preserve_header_case: bool, title_case_headers: bool, h09_responses: bool, notify_read: bool, reading: Reading, writing: Writing, upgrade: Option<Pending>, version: Version,
}

Fields§

§allow_half_close: bool§cached_headers: Option<HeaderMap>

Re-usable HeaderMap to reduce allocating new ones.

§error: Option<Error>

If an error occurs when there wasn’t a direct way to return it back to the user, this is set.

§keep_alive: KA

Current keep-alive status.

§method: Option<Method>

If mid-message, the HTTP Method that started it.

This is used to know things such as if the message can include a body or not.

§h1_parser_config: ParserConfig§h1_header_read_timeout: Option<Duration>§h1_header_read_timeout_fut: Option<Pin<Box<Sleep>>>§h1_header_read_timeout_running: bool§preserve_header_case: bool§title_case_headers: bool§h09_responses: bool§notify_read: bool

Set to true when the Dispatcher should poll read operations again. See the maybe_notify method for more.

§reading: Reading

State of allowed reads

§writing: Writing

State of allowed writes

§upgrade: Option<Pending>

An expected pending HTTP upgrade.

§version: Version

Either HTTP/1.0 or 1.1 connection

Implementations§

source§

impl State

source

fn close(&mut self)

source

fn close_read(&mut self)

source

fn close_write(&mut self)

source

fn wants_keep_alive(&self) -> bool

source

fn try_keep_alive<T: Http1Transaction>(&mut self)

source

fn disable_keep_alive(&mut self)

source

fn busy(&mut self)

source

fn idle<T: Http1Transaction>(&mut self)

source

fn is_idle(&self) -> bool

source

fn is_read_closed(&self) -> bool

source

fn is_write_closed(&self) -> bool

source

fn prepare_upgrade(&mut self) -> OnUpgrade

Trait Implementations§

source§

impl Debug for State

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for State

§

impl Send for State

§

impl Sync for State

§

impl Unpin for State

§

impl !UnwindSafe for State

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere 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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more