pub struct Builder { /* 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 Builder
impl Builder
Sourcepub fn options(self, opts: Http1Options) -> Self
pub fn options(self, opts: Http1Options) -> Self
Provide a options configuration for the HTTP/1 connection.
Sourcepub async fn handshake<T, B>(
self,
io: T,
) -> Result<(SendRequest<B>, Connection<T, B>)>
pub async fn handshake<T, B>( self, io: T, ) -> Result<(SendRequest<B>, Connection<T, B>)>
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 Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnsafeUnpin for Builder
impl UnwindSafe for Builder
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