pub struct MitmProxyHandle { /* private fields */ }Expand description
Handle to a running proxy, providing shutdown, config reload, and metrics access.
Implementations§
Source§impl MitmProxyHandle
impl MitmProxyHandle
Sourcepub async fn reload(&self, next_config: MitmConfig) -> Result<(), MitmError>
pub async fn reload(&self, next_config: MitmConfig) -> Result<(), MitmError>
Hot-reloads the proxy configuration. Currently only interception scope changes are supported; other field changes will return an error.
Sourcepub async fn current_config(&self) -> MitmConfig
pub async fn current_config(&self) -> MitmConfig
Returns a snapshot of the currently active configuration.
Sourcepub async fn shutdown(self, timeout: Duration) -> Result<(), MitmError>
pub async fn shutdown(self, timeout: Duration) -> Result<(), MitmError>
Gracefully shuts down the proxy, draining active flows before the deadline.
pub fn metrics(&self) -> ProxyMetrics
Auto Trait Implementations§
impl Freeze for MitmProxyHandle
impl !RefUnwindSafe for MitmProxyHandle
impl Send for MitmProxyHandle
impl Sync for MitmProxyHandle
impl Unpin for MitmProxyHandle
impl UnsafeUnpin for MitmProxyHandle
impl !UnwindSafe for MitmProxyHandle
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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