pub struct HttpConnectionBuilder { /* private fields */ }Expand description
Builder for HttpConnection.
Implementations§
Source§impl HttpConnectionBuilder
impl HttpConnectionBuilder
Sourcepub fn disable_nagle(self) -> Self
pub fn disable_nagle(self) -> Self
Set TCP_NODELAY.
Sourcepub fn connect_timeout(self, d: Duration) -> Self
pub fn connect_timeout(self, d: Duration) -> Self
TCP connect timeout.
Sourcepub fn tcp_keepalive(self, idle: Duration) -> Self
pub fn tcp_keepalive(self, idle: Duration) -> Self
Set TCP keepalive idle time.
Enables OS-level dead connection detection. The kernel sends
probes after idle of inactivity.
Sourcepub fn recv_buffer_size(self, n: usize) -> Self
pub fn recv_buffer_size(self, n: usize) -> Self
Set SO_RCVBUF (socket receive buffer size).
Sourcepub fn send_buffer_size(self, n: usize) -> Self
pub fn send_buffer_size(self, n: usize) -> Self
Set SO_SNDBUF (socket send buffer size).
Sourcepub async fn connect(
self,
url: &str,
) -> Result<HttpConnection<MaybeTls>, RestError>
pub async fn connect( self, url: &str, ) -> Result<HttpConnection<MaybeTls>, RestError>
Connect to an HTTP(S) endpoint. TLS auto-detected from scheme.
Sourcepub fn connect_with<S: WireStream + Unpin>(self, stream: S) -> HttpConnection<S>
pub fn connect_with<S: WireStream + Unpin>(self, stream: S) -> HttpConnection<S>
Connect with a pre-connected async stream.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HttpConnectionBuilder
impl !RefUnwindSafe for HttpConnectionBuilder
impl Send for HttpConnectionBuilder
impl Sync for HttpConnectionBuilder
impl Unpin for HttpConnectionBuilder
impl UnsafeUnpin for HttpConnectionBuilder
impl !UnwindSafe for HttpConnectionBuilder
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