pub struct RetryLog { /* private fields */ }Expand description
A shared, drainable buffer of RetryNotices.
Wired as an Arc the agent and the provider both hold, rather than a
callback on the Provider trait: the provider is built inside
Agent::new, long before an event sink is installed, and every mock
provider in the test suite would otherwise have to grow a method it does
not use. The agent drains this after each complete() call, so notices
always attach to the round-trip that produced them.
Implementations§
Source§impl RetryLog
impl RetryLog
Sourcepub fn record(&self, notice: RetryNotice)
pub fn record(&self, notice: RetryNotice)
Record one retry.
Sourcepub fn drain(&self) -> Vec<RetryNotice>
pub fn drain(&self) -> Vec<RetryNotice>
Take everything recorded so far, leaving the log empty.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RetryLog
impl RefUnwindSafe for RetryLog
impl Send for RetryLog
impl Sync for RetryLog
impl Unpin for RetryLog
impl UnsafeUnpin for RetryLog
impl UnwindSafe for RetryLog
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