#[non_exhaustive]pub enum StopReason {
Aborted,
AllResponded,
AttemptsSpent,
DeadlineExpired,
StreamClosed,
TimedOut,
}Expand description
Why a scanner’s receive loop stopped.
The most informative field in an audit: a run ending in
AllResponded was not cut short, and one ending in
DeadlineExpired with replies still arriving almost
certainly was.
A scan loop breaks with its reason, so every exit path names one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Aborted
The caller aborted the scan through the scan handle.
AllResponded
Every target answered.
AttemptsSpent
Every target either answered or was asked as often as the retry budget allows.
Like AllResponded, the scan finished.
DeadlineExpired
The adaptive deadline expired: either the hard budget ran out or the silence tolerance did.
StreamClosed
The capture stream closed underneath the scanner.
TimedOut
The wall-clock budget the caller set on the whole scan ran out, and
every strategy wound down where it stood. See
ZondConfig::scan_timeout.
Unlike Aborted, nobody stopped it: the scan was given
less time than the network needed. Unlike
DeadlineExpired, which is one receive loop’s
own pacing, this is about the whole run.
Implementations§
Source§impl StopReason
impl StopReason
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every reason a receive loop stops, in declaration order. Checked against the published schema.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Whether the loop stopped because it had nothing left to do, rather than because something cut it short.
A complete run found everything it was going to; waiting longer could not have changed it.
Trait Implementations§
Source§impl Clone for StopReason
impl Clone for StopReason
impl Copy for StopReason
Source§impl Debug for StopReason
impl Debug for StopReason
Source§impl Display for StopReason
impl Display for StopReason
impl Eq for StopReason
Source§impl From<StopCause> for StopReason
impl From<StopCause> for StopReason
Source§impl Hash for StopReason
impl Hash for StopReason
Source§impl PartialEq for StopReason
impl PartialEq for StopReason
impl StructuralPartialEq for StopReason
Auto Trait Implementations§
impl Freeze for StopReason
impl RefUnwindSafe for StopReason
impl Send for StopReason
impl Sync for StopReason
impl Unpin for StopReason
impl UnsafeUnpin for StopReason
impl UnwindSafe for StopReason
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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