pub enum State {
Idle,
SendResponse,
SendBody,
Done,
MustClose,
Closed,
Error,
MightSwitchProtocol,
SwitchedProtocol,
}Expand description
Per-role state in the HTTP/1.1 connection state machine.
Variants§
Idle
Ready to start a new request/response cycle.
SendResponse
Server is expected to send a response head.
SendBody
Body data may be sent.
Done
Message for this role is complete.
MustClose
Role is complete and the connection must close.
Closed
Role has closed.
Error
Protocol error state.
MightSwitchProtocol
Client proposed a protocol switch and is waiting for the response.
SwitchedProtocol
Protocol has switched away from HTTP/1.1.
Trait Implementations§
impl Copy for State
impl Eq for State
impl StructuralPartialEq for State
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin 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