pub struct SentTracker(/* private fields */);Expand description
Whether request bytes may have left the process. Clones share state.
Implementations§
Source§impl SentTracker
impl SentTracker
pub fn new() -> Self
Sourcepub fn begin_write(&self) -> bool
pub fn begin_write(&self) -> bool
Called before a request byte is written. False once aborted: the write must not happen.
Sourcepub fn try_abort(&self) -> bool
pub fn try_abort(&self) -> bool
Forbid every future write. True if no write ever began, so no request byte left the process and none will; false if one may have.
Sourcepub fn is_aborted(&self) -> bool
pub fn is_aborted(&self) -> bool
True once Self::try_abort won: no request byte ever left.
Sourcepub fn may_have_sent(&self) -> bool
pub fn may_have_sent(&self) -> bool
True once a write began: request bytes may have left the process. Conservative: a write that began counts even if it failed.
Trait Implementations§
Source§impl Clone for SentTracker
impl Clone for SentTracker
Source§impl Debug for SentTracker
impl Debug for SentTracker
Auto Trait Implementations§
impl Freeze for SentTracker
impl RefUnwindSafe for SentTracker
impl Send for SentTracker
impl Sync for SentTracker
impl Unpin for SentTracker
impl UnsafeUnpin for SentTracker
impl UnwindSafe for SentTracker
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