pub struct HttpDial { /* private fields */ }Expand description
An HTTP connection being set up without blocking (TCP connect, TLS). Hand it
to Driver::connect.
Implementations§
Source§impl HttpDial
impl HttpDial
Sourcepub fn new(
target: Target,
cfg: Arc<ClientConfig>,
opts: HttpOptions,
) -> Result<Self>
pub fn new( target: Target, cfg: Arc<ClientConfig>, opts: HttpOptions, ) -> Result<Self>
A dial to target; its headers are sent with every request.
§Errors
The buffer in opts is too small, or a header contains CR/LF.
Source§impl HttpDial
impl HttpDial
Sourcepub fn connect_blocking(self) -> Result<HttpConn>
pub fn connect_blocking(self) -> Result<HttpConn>
Connects and runs the TLS handshake, waiting until done: a convenience
for tools and tests. In a busy-spin loop use Driver::connect. Without
Target::addr the host is resolved with the system resolver (blocking).
§Errors
Resolution, connect or TLS failure, or no progress for 30 s.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for HttpDial
impl !UnwindSafe for HttpDial
impl Freeze for HttpDial
impl Send for HttpDial
impl Sync for HttpDial
impl Unpin for HttpDial
impl UnsafeUnpin for HttpDial
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