pub struct UpgradeableConnection<'a, I, S, E>where
S: HttpService<Incoming>,{ /* private fields */ }
Expand description
An upgradable Connection
, returned by
Builder::serve_upgradable_connection
.
To drive HTTP on this connection this future must be polled, typically with
.await
. If it isn’t polled, no progress will be made on this connection.
Implementations§
Source§impl<I, S, E, B> UpgradeableConnection<'_, I, S, E>
impl<I, S, E, B> UpgradeableConnection<'_, I, S, E>
Sourcepub fn graceful_shutdown(self: Pin<&mut Self>)
pub fn graceful_shutdown(self: Pin<&mut Self>)
Start a graceful shutdown process for this connection.
This UpgradeableConnection
should continue to be polled until shutdown can finish.
§Note
This should only be called while the Connection
future is still nothing. pending. If
called after UpgradeableConnection::poll
has resolved, this does nothing.
Sourcepub fn into_owned(self) -> UpgradeableConnection<'static, I, S, E> ⓘ
pub fn into_owned(self) -> UpgradeableConnection<'static, I, S, E> ⓘ
Make this Connection static, instead of borrowing from Builder.
Trait Implementations§
Source§impl<I, S, E, B> Future for UpgradeableConnection<'_, I, S, E>
impl<I, S, E, B> Future for UpgradeableConnection<'_, I, S, E>
impl<'__pin, 'a, I, S, E> Unpin for UpgradeableConnection<'a, I, S, E>
Auto Trait Implementations§
impl<'a, I, S, E> !Freeze for UpgradeableConnection<'a, I, S, E>
impl<'a, I, S, E> !RefUnwindSafe for UpgradeableConnection<'a, I, S, E>
impl<'a, I, S, E> Send for UpgradeableConnection<'a, I, S, E>
impl<'a, I, S, E> Sync for UpgradeableConnection<'a, I, S, E>
impl<'a, I, S, E> !UnwindSafe for UpgradeableConnection<'a, I, S, E>
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more