pub struct ProgressGuard { /* private fields */ }Expand description
Progress reporter: after delay, emit one localized line to stderr if still running.
done is an [AtomicBool] shared with a background task (not Mutex<bool>).
Stores/loads use Ordering::SeqCst so finish is visible before the delayed
write without relying on abort alone.
§Drop / non-orphan tasks
Tokio’s [JoinHandle] detaches the task on drop (does not abort). This guard
implements Drop so early ? returns and cancel races still abort the timer
(Rules Rust: no orphan critical tasks; fixed fan-out of at most one progress task).
Implementations§
Trait Implementations§
Source§impl Drop for ProgressGuard
impl Drop for ProgressGuard
Auto Trait Implementations§
impl Freeze for ProgressGuard
impl RefUnwindSafe for ProgressGuard
impl Send for ProgressGuard
impl Sync for ProgressGuard
impl Unpin for ProgressGuard
impl UnsafeUnpin for ProgressGuard
impl UnwindSafe for ProgressGuard
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more