#[non_exhaustive]pub enum Coverage {
Covered,
Withheld,
OutOfScope,
Unreached,
Unstated,
}Expand description
What a report says about whether it looked at a target.
Mostly read off the TargetScope of the
report’s phases, which record the ranges a scan walked after its exclusion
policy and the ranges that policy withheld. A report with no scope, such as one
rebuilt from a foreign scanner’s output or from a scan that stopped before
writing a phase, answers Unstated.
Unreached comes from the record itself and overrules the
scope: a scope says what a scan set out to walk, while a port recorded
Unasked or an address a phase names
as undecided says how far it got.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Covered
The report says a phase walked this target.
Withheld
The report says an exclusion policy withheld this target. The scan was forbidden to look, so nothing here is evidence about the network.
OutOfScope
The report states what it walked, and this target was not in it.
Unreached
The scan named this target and ran short before probing it. The record
says so by carrying the endpoint at
PortState::Unasked, or by
naming the address among a phase’s
undecided ones where no phase
reached a verdict on it.
This keeps a scan cut short by its wall clock from reporting every port it did not reach as closed.
Unstated
The report does not say what it covered, so whether it looked is unknown.
Implementations§
Source§impl Coverage
impl Coverage
Sourcepub const ALL: &'static [Self]
pub const ALL: &'static [Self]
Every answer, in declaration order.
The export conformance suite checks this against the exported comparison schema’s list, so a new answer cannot ship without a schema name that consumers’ validators accept.
Sourcepub fn is_covered(&self) -> bool
pub fn is_covered(&self) -> bool
Whether the report is known to have walked the target.
Sourcepub fn is_excluded(&self) -> bool
pub fn is_excluded(&self) -> bool
Whether the report is known not to have walked the target, for either reason.
Unreached answers false here and to
is_covered.
Trait Implementations§
impl Copy for Coverage
impl Eq for Coverage
impl StructuralPartialEq for Coverage
Auto Trait Implementations§
impl Freeze for Coverage
impl RefUnwindSafe for Coverage
impl Send for Coverage
impl Sync for Coverage
impl Unpin for Coverage
impl UnsafeUnpin for Coverage
impl UnwindSafe for Coverage
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