pub struct Connection { /* private fields */ }
Expand description
HTTP connection to a remote host
Implementations§
Source§impl Connection
impl Connection
Sourcepub fn open(
addr: &str,
port: u16,
opts: &ConnectionOptions,
) -> Result<Self, Error>
pub fn open( addr: &str, port: u16, opts: &ConnectionOptions, ) -> Result<Self, Error>
Create a new connection to an HTTP server
Sourcepub fn request_count(&self) -> usize
pub fn request_count(&self) -> usize
Number of requests we’ve made since opening connection
Auto Trait Implementations§
impl !Freeze for Connection
impl RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl UnwindSafe for Connection
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