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.
Sourcepub fn use_multi_transfer(self) -> Self
pub fn use_multi_transfer(self) -> Self
This method allows the user to switch the transfer type to Curl Multi for the CurlActor.
Sourcepub fn use_easy2_transfer(self) -> Self
pub fn use_easy2_transfer(self) -> Self
This method allows the user to switch the transfer type to Curl Easy2 for the CurlActor.
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.