pub enum Mode {
Request,
Response,
}Expand description
Which side of the connection a Decoder reads.
The two modes raise the same Events, Event::Upgrade included: a
server decoding an upgrade or CONNECT request sees it just as a client
decoding the 101 or 2xx does. What differs is who decides. In
Mode::Response the peer has already switched protocols, so the decoder
is finished with the connection. In Mode::Request the peer has only
asked, and the host answers.
Variants§
Request
Server side: decode requests.
Response
Client side: decode responses. Call Decoder::response_to first.
Trait Implementations§
impl Copy for Mode
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Forget for Mode
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
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