pub struct RequestCountSession { /* private fields */ }Expand description
A Session that limits the total number of requests allowed to procede
This type is useful in the case of resolving dependencies of an object. A limit can be set that decides when the resolver has recursed too far.
Implementations§
Trait Implementations§
Source§impl Session for RequestCountSession
impl Session for RequestCountSession
Source§fn should_procede(&mut self, _: &Url) -> bool
fn should_procede(&mut self, _: &Url) -> bool
Returns false if a request to the given URL should not procede
Source§fn mark_success(&mut self, _: &Url)
fn mark_success(&mut self, _: &Url)
Update the session from a successful request
Source§fn mark_failure(&mut self, _: &Url)
fn mark_failure(&mut self, _: &Url)
Update the session from a failed request
Auto Trait Implementations§
impl Freeze for RequestCountSession
impl RefUnwindSafe for RequestCountSession
impl Send for RequestCountSession
impl Sync for RequestCountSession
impl Unpin for RequestCountSession
impl UnwindSafe for RequestCountSession
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