Struct Handshake

#[must_use = "futures do nothing unless polled"]
pub struct Handshake<T, B: Buf = Bytes> { /* private fields */ }

In progress HTTP/2 connection handshake future.

This type implements Future, yielding a Connection instance once the handshake has completed.

The handshake is completed once the connection preface is fully received from the client and the initial settings frame is sent to the client.

The handshake future does not wait for the initial settings frame from the client.

See module level docs for more details.

Trait Implementations

impl<T, B> Debug for Handshake<T, B> where T: AsyncRead + AsyncWrite + Debug, B: Debug + Buf,

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

impl<T, B> Future for Handshake<T, B> where T: AsyncRead + AsyncWrite + Unpin, B: Buf,

type Output = Result<Connection<T, B>, Error>;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>

Auto Trait Implementations

impl<T, B = Bytes> !Freeze for Handshake<T, B>

impl<T, B = Bytes> !RefUnwindSafe for Handshake<T, B>

impl<T, B = Bytes> !UnwindSafe for Handshake<T, B>

impl<T, B> Send for Handshake<T, B> where Handshaking<T, B>: Send,

impl<T, B> Sync for Handshake<T, B> where Handshaking<T, B>: Sync,

impl<T, B> Unpin for Handshake<T, B> where Handshaking<T, B>: Unpin,

impl<T, B> UnsafeUnpin for Handshake<T, B> where Handshaking<T, B>: UnsafeUnpin,

Blanket Implementations

impl<F> IntoFuture for Handshake<T, B> where F: Future,

type Output = <F as Future>::Output;
type IntoFuture = F;
fn into_future(self) -> <F as IntoFuture>::IntoFuture

impl<F, T, E> TryFuture for Handshake<T, B> where F: Future<Output = Result<T, E>> + ?Sized,

type Ok = T;
type Error = E;
fn try_poll(self: Pin<&mut F>, cx: &mut Context<'_>) -> Poll<<F as Future>::Output>

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

fn type_id(&self) -> TypeId

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

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for Handshake<T, B> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for Handshake<T, B>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FutureExt for Handshake<T, B> where T: Future + ?Sized,

impl<T> Instrument for Handshake<T, B>

impl<T> WithSubscriber for Handshake<T, B>

impl<T, U> Into<U> for Handshake<T, B> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for Handshake<T, B> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>