pub struct Handler { /* private fields */ }Implementations§
Source§impl Handler
impl Handler
Sourcepub fn get_client(&self) -> &Client
pub fn get_client(&self) -> &Client
This function allows you to get a Surf client that can be used to perform an async http call If the connection is previously established, the connection is already ready to use
use surf_pool::SurfPoolBuilder;
let builder = SurfPoolBuilder::new(3).unwrap();
let pool = builder.build().await;
let handler = pool.get_handler().await.unwrap();
handler
.get_client()
.get("https://httpbin.org")
.recv_string()
.await;Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handler
impl !RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl !UnwindSafe for Handler
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