pub struct CurlActor<H>{ /* private fields */ }Implementations§
Source§impl<H> CurlActor<H>
impl<H> CurlActor<H>
Sourcepub fn new() -> Self
pub fn new() -> Self
This creates the new instance of CurlActor to handle Curl perform asynchronously using Curl Multi in a background thread to avoid blocking of other tasks.
Sourcepub fn new_runtime(runtime: Runtime) -> Self
pub fn new_runtime(runtime: Runtime) -> Self
This creates the new instance of CurlActor to handle Curl perform asynchronously using Curl Multi in a background thread to avoid blocking of other tasks. The user can provide a custom runtime to use for the background task.
Sourcepub fn new_runtime_with_capacity(runtime: Runtime, capacity: usize) -> Self
pub fn new_runtime_with_capacity(runtime: Runtime, capacity: usize) -> Self
Create a new CurlActor with a user-provided runtime and configurable channel capacity.
Trait Implementations§
Source§impl<H> Actor<H> for CurlActor<H>
impl<H> Actor<H> for CurlActor<H>
Source§fn send_request<'life0, 'async_trait>(
&'life0 self,
easy2: Easy2<H>,
) -> Pin<Box<dyn Future<Output = Result<Easy2<H>, Error<H>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_request<'life0, 'async_trait>(
&'life0 self,
easy2: Easy2<H>,
) -> Pin<Box<dyn Future<Output = Result<Easy2<H>, Error<H>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
This will send Easy2 into the background task that will perform curl asynchronously, await the response in the oneshot receiver and return Easy2 back to the caller.
Auto Trait Implementations§
impl<H> !RefUnwindSafe for CurlActor<H>
impl<H> !UnwindSafe for CurlActor<H>
impl<H> Freeze for CurlActor<H>
impl<H> Send for CurlActor<H>
impl<H> Sync for CurlActor<H>
impl<H> Unpin for CurlActor<H>
impl<H> UnsafeUnpin for CurlActor<H>
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