pub struct ProxyManager { /* private fields */ }Implementations§
Source§impl ProxyManager
impl ProxyManager
pub async fn from_proxy_config(proxy_config: &ProxyConfig) -> Result<Self>
pub async fn from_config(config_str: &str) -> Result<Self>
pub fn new() -> Self
pub fn with_config(config: PoolConfig) -> Self
pub async fn get_proxy(&self, provider_name: Option<&str>) -> Result<ProxyEnum>
pub async fn get_tunnel(&self) -> Result<ProxyEnum>
pub async fn report_proxy_result( &self, proxy: &ProxyEnum, success: bool, response_time: Option<Duration>, ) -> Result<()>
pub async fn report_success( &self, proxy: &ProxyEnum, response_time: Option<Duration>, ) -> Result<()>
pub async fn report_failure(&self, proxy: &ProxyEnum) -> Result<()>
pub async fn get_status(&self) -> HashMap<String, usize>
pub async fn get_detailed_stats(&self) -> PoolStats
pub async fn health_check(&self) -> Result<()>
pub async fn add_ip_provider(&mut self, provider: Box<dyn IpProxyLoader>)
pub async fn add_tunnel(&mut self, tunnel: Tunnel)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyManager
impl !UnwindSafe for ProxyManager
impl Freeze for ProxyManager
impl Send for ProxyManager
impl Sync for ProxyManager
impl Unpin for ProxyManager
impl UnsafeUnpin for ProxyManager
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