pub struct ProxyServer { /* private fields */ }Expand description
HTTP/HTTPS proxy server
Implementations§
Source§impl ProxyServer
impl ProxyServer
Sourcepub fn new(config: ProxyConfig) -> Self
pub fn new(config: ProxyConfig) -> Self
Create a new proxy server with the given configuration
Sourcepub fn with_pool(config: ProxyConfig, pool: ConnectionPool) -> Self
pub fn with_pool(config: ProxyConfig, pool: ConnectionPool) -> Self
Create a new proxy server with custom connection pool
Sourcepub fn total_connections(&self) -> u64
pub fn total_connections(&self) -> u64
Get total connections handled
Sourcepub fn total_requests(&self) -> u64
pub fn total_requests(&self) -> u64
Get total requests handled
Sourcepub fn connection_pool(&self) -> &Arc<ConnectionPool>
pub fn connection_pool(&self) -> &Arc<ConnectionPool>
Get connection pool reference
Auto Trait Implementations§
impl Freeze for ProxyServer
impl !RefUnwindSafe for ProxyServer
impl Send for ProxyServer
impl Sync for ProxyServer
impl Unpin for ProxyServer
impl !UnwindSafe for ProxyServer
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