pub struct ScannerFailure { /* private fields */ }Expand description
A scanning strategy that did not run to completion.
A scan continues with the remaining strategies when one fails, so a report with failures still has narrower results. This tells an empty network from a sweep whose raw scanner never started.
is_cut_short tells two kinds apart. A failure met a fault
(a socket that would not open, a capture that closed, a panic). A cut-short strategy
stopped against a limit (a budget, the file limit, a pinned source port in use).
Both leave ground unanswered, so ScanReport::is_partial counts both, but the
remedies differ.
Implementations§
Source§impl ScannerFailure
impl ScannerFailure
Sourcepub fn new(scanner: ScannerKind, reason: impl Into<String>) -> Self
pub fn new(scanner: ScannerKind, reason: impl Into<String>) -> Self
Records a failure as having happened now.
Sourcepub fn cut_short(scanner: ScannerKind, reason: impl Into<String>) -> Self
pub fn cut_short(scanner: ScannerKind, reason: impl Into<String>) -> Self
Records, as having happened now, work scanner stopped short of because a limit
was reached. reason names the limit.
Sourcepub fn is_cut_short(&self) -> bool
pub fn is_cut_short(&self) -> bool
Whether this is work a limit cut short rather than a fault stopped.
False for a record from a document without the distinction, which reads every entry as a failure.
Sourcepub fn scanner(&self) -> ScannerKind
pub fn scanner(&self) -> ScannerKind
The strategy that failed.
Sourcepub fn recorded_at(self, at: SystemTime) -> Self
pub fn recorded_at(self, at: SystemTime) -> Self
Restores the time this failure was recorded.
For a failure restored from a journal; new stamps the current
time.
Sourcepub fn at(&self) -> SystemTime
pub fn at(&self) -> SystemTime
When the failure was observed.
Trait Implementations§
Source§impl Clone for ScannerFailure
impl Clone for ScannerFailure
Source§impl Debug for ScannerFailure
impl Debug for ScannerFailure
Source§impl Display for ScannerFailure
impl Display for ScannerFailure
impl Eq for ScannerFailure
Source§impl From<&FailureRecord> for ScannerFailure
impl From<&FailureRecord> for ScannerFailure
Source§fn from(record: &FailureRecord) -> Self
fn from(record: &FailureRecord) -> Self
Source§impl From<&ScannerFailure> for FailureRecord
impl From<&ScannerFailure> for FailureRecord
Source§fn from(failure: &ScannerFailure) -> Self
fn from(failure: &ScannerFailure) -> Self
Source§impl PartialEq for ScannerFailure
impl PartialEq for ScannerFailure
impl StructuralPartialEq for ScannerFailure
Auto Trait Implementations§
impl Freeze for ScannerFailure
impl RefUnwindSafe for ScannerFailure
impl Send for ScannerFailure
impl Sync for ScannerFailure
impl Unpin for ScannerFailure
impl UnsafeUnpin for ScannerFailure
impl UnwindSafe for ScannerFailure
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