Skip to main content

Upgraded

Struct Upgraded 

Source
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
where *const dyn Stream is !null: Freeze, PhantomData<dyn Stream>: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, *const ArcInner<Atomic<bool>> is !null: Freeze, PhantomData<ArcInner<Atomic<bool>>>: Freeze,

§

impl Move for Upgraded

§

impl Send for Upgraded
where BoxRaw<dyn Stream>: Send, RawVecInner: Send, Arc<Atomic<bool>>: Send,

§

impl Sync for Upgraded
where BoxRaw<dyn Stream>: Sync, RawVecInner: Sync, Arc<Atomic<bool>>: Sync,

§

impl Unpin for Upgraded
where Box<dyn Stream>: Unpin, *const u8 is !null: Unpin, Arc<Atomic<bool>>: Unpin,

§

impl UnsafeUnpin for Upgraded

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.