pub struct ProxyHandle {
pub proxy_url: String,
/* private fields */
}Expand description
RAII guard returned from ProxyManager::acquire_proxy.
Call mark_success once the request using
this proxy completes successfully. If the handle is dropped without a
success mark the circuit breaker is notified of a failure.
Fields§
§proxy_url: StringURL of the selected proxy.
Implementations§
Source§impl ProxyHandle
impl ProxyHandle
Sourcepub fn direct() -> Self
pub fn direct() -> Self
Create a no-proxy handle used when no proxy manager is configured.
The handle targets an empty URL and uses a noop circuit breaker that can never trip; its Drop records a success so there are no false failures.
Sourcepub fn mark_success(&self)
pub fn mark_success(&self)
Signal that the request succeeded.
Trait Implementations§
Source§impl Debug for ProxyHandle
impl Debug for ProxyHandle
Auto Trait Implementations§
impl !Freeze for ProxyHandle
impl !RefUnwindSafe for ProxyHandle
impl Send for ProxyHandle
impl Sync for ProxyHandle
impl Unpin for ProxyHandle
impl UnsafeUnpin for ProxyHandle
impl !UnwindSafe for ProxyHandle
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