Skip to main content

ProxyLease

Trait ProxyLease 

Source
pub trait ProxyLease:
    Send
    + Sync
    + 'static {
    // Required method
    fn mark_success(&self);
}
Expand description

RAII guard for a proxy acquired from a ProxySource.

Held for the lifetime of the browser instance using the proxy. Call mark_success when the browser session completes cleanly. Dropping without calling it signals a failure to the underlying circuit breaker (if any).

§Example

use stygian_browser::proxy::{ProxyLease, DirectLease};
let lease: Box<dyn ProxyLease> = Box::new(DirectLease);
lease.mark_success(); // no-op for DirectLease

Required Methods§

Source

fn mark_success(&self)

Record that the browser session using this proxy completed successfully.

Implementors§