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
impl State
fn close(&mut self)
fn close_read(&mut self)
fn close_write(&mut self)
fn wants_keep_alive(&self) -> bool
fn try_keep_alive<T: Http1Transaction>(&mut self)
fn disable_keep_alive(&mut self)
fn busy(&mut self)
fn idle<T: Http1Transaction>(&mut self)
fn is_idle(&self) -> bool
fn is_read_closed(&self) -> bool
fn is_write_closed(&self) -> bool
fn prepare_upgrade(&mut self) -> OnUpgrade ⓘ
Trait Implementations§
Auto Trait Implementations§
impl Freeze for State
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more