pub struct Builder<Ex> { /* private fields */ }Expand description
A builder to configure an HTTP connection.
After setting options, the builder is used to create a handshake future.
Note: The default values of options are not considered stable. They are subject to change at any time.
Implementations§
Source§impl<Ex> Builder<Ex>where
Ex: Clone,
impl<Ex> Builder<Ex>where
Ex: Clone,
Sourcepub fn options(self, opts: Http2Options) -> Self
pub fn options(self, opts: Http2Options) -> Self
Provide a options configuration for the HTTP/2 connection.
Sourcepub async fn handshake<T, B>(
self,
io: T,
) -> Result<(SendRequest<B>, Connection<T, B, Ex>)>
pub async fn handshake<T, B>( self, io: T, ) -> Result<(SendRequest<B>, Connection<T, B, Ex>)>
Constructs a connection with the configured options and IO.
Note, if Connection is not await-ed, SendRequest will
do nothing.
Trait Implementations§
Auto Trait Implementations§
impl<Ex> Freeze for Builder<Ex>where
Ex: Freeze,
impl<Ex> !RefUnwindSafe for Builder<Ex>
impl<Ex> Send for Builder<Ex>where
Ex: Send,
impl<Ex> Sync for Builder<Ex>where
Ex: Sync,
impl<Ex> Unpin for Builder<Ex>where
Ex: Unpin,
impl<Ex> UnsafeUnpin for Builder<Ex>where
Ex: UnsafeUnpin,
impl<Ex> !UnwindSafe for Builder<Ex>
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