pub struct HttpConnection { /* private fields */ }Expand description
HTTP connection wrapper
Implementations§
Source§impl HttpConnection
impl HttpConnection
Sourcepub fn new(config: HttpConfig) -> Result<Self, HttpError>
pub fn new(config: HttpConfig) -> Result<Self, HttpError>
Create a new HTTP connection
Sourcepub async fn send_request(
&self,
request: &HttpRequest,
) -> Result<HttpResponse, HttpError>
pub async fn send_request( &self, request: &HttpRequest, ) -> Result<HttpResponse, HttpError>
Send an HTTP request
Sourcepub fn config(&self) -> &HttpConfig
pub fn config(&self) -> &HttpConfig
Get the configuration
Trait Implementations§
Source§impl Clone for HttpConnection
impl Clone for HttpConnection
Source§fn clone(&self) -> HttpConnection
fn clone(&self) -> HttpConnection
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpConnection
impl !RefUnwindSafe for HttpConnection
impl Send for HttpConnection
impl Sync for HttpConnection
impl Unpin for HttpConnection
impl !UnwindSafe for HttpConnection
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