pub struct Upgraded {
pub stream: Box<dyn Stream>,
pub buffered: Vec<u8>,
pub peer: Option<SocketAddr>,
pub stop: Arc<AtomicBool>,
}Expand description
(G7d) a connection after an upgrade, as the server hands it over
Fields§
§stream: Box<dyn Stream>the connection (TCP, or TLS under Server::start_with); reads and writes have no timeouts
set, the protocol sets its own
buffered: Vec<u8>bytes the client sent after its request that the server had already read
peer: Option<SocketAddr>the client’s address
stop: Arc<AtomicBool>set when the server stops (Server::stop waits for the upgraded connections to end)
Auto Trait Implementations§
impl !RefUnwindSafe for Upgraded
impl !UnwindSafe for Upgraded
impl Forget for Upgraded
impl Freeze for Upgraded
impl Move for Upgraded
impl Send for Upgraded
impl Sync for Upgraded
impl Unpin for Upgraded
impl UnsafeUnpin for Upgradedwhere
*const dyn Stream is !null: UnsafeUnpin,
PhantomData<dyn Stream>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<Atomic<bool>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Atomic<bool>>>: UnsafeUnpin,
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