pub struct ProxyLease { /* private fields */ }Expand description
One request reservation and its reusable per-node HTTP client. Report an outcome once if sending through the client manually. Dropping an unreported lease releases a recovery slot without declaring success or failure.
Implementations§
Source§impl ProxyLease
impl ProxyLease
Sourcepub fn client(&self) -> &Client
pub fn client(&self) -> &Client
Reused client. Use one request per lease to preserve accurate quota counts.
Sourcepub fn report_success(&mut self)
pub fn report_success(&mut self)
Mark this attempt as successful, resetting consecutive failures.
Sourcepub fn report_failure(&mut self)
pub fn report_failure(&mut self)
Mark a transport/proxy failure and force the next request to reselect.
Trait Implementations§
Source§impl Drop for ProxyLease
impl Drop for ProxyLease
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyLease
impl !UnwindSafe for ProxyLease
impl Freeze for ProxyLease
impl Send for ProxyLease
impl Sync for ProxyLease
impl Unpin for ProxyLease
impl UnsafeUnpin for ProxyLease
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