#[non_exhaustive]pub enum StrategyError {
Transport(TransportError),
Channel(ChannelError),
Capture(CaptureError),
Interface {
interface: String,
reason: &'static str,
},
MismatchedTransport {
kind: ProbeKind,
protocol: Protocol,
},
Probe(String),
Panicked {
scanner: ScannerKind,
detail: String,
},
}Expand description
Why one scanning strategy could not start, or could not finish.
A scan runs several strategies and carries on with whatever survives, so
discover and scan record
one of these in the report’s failures
and announce it on the event stream. It reaches a caller directly only when they
build and run a strategy themselves.
The variants are the layers a strategy is assembled from. A Transport,
Channel or Capture failure is most often missing privileges, which a
scan’s unprivileged fallback covers; the underlying error says which. An
Interface failure concerns one interface and leaves the others unaffected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport(TransportError)
The raw probe transport could not be opened.
Channel(ChannelError)
The link-layer channel a local sweep needs could not be opened.
Capture(CaptureError)
Nothing could be captured on the links a listener was given.
The capture’s own error, which names each link and what refused it.
Interface
The interface this strategy was given cannot be probed from.
MismatchedTransport
The transport a port scan was handed was opened for another kind of probe, so its capture would admit none of the scan’s answers.
Refused because a scan that hears nothing files every port as silent, which looks exactly like a network that drops everything. Every port it was handed is recorded as unasked.
Fields
Probe(String)
The strategy’s probes could not be built. A bug or an impossible target, since a probe is built from values this engine chose.
Panicked
A strategy panicked.
Always an engine bug. Reported so the scan does not look merely empty.
Trait Implementations§
Source§impl Coded for StrategyError
impl Coded for StrategyError
Source§impl Debug for StrategyError
impl Debug for StrategyError
Source§impl Display for StrategyError
impl Display for StrategyError
Source§impl Error for StrategyError
impl Error for StrategyError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CaptureError> for StrategyError
impl From<CaptureError> for StrategyError
Source§fn from(source: CaptureError) -> Self
fn from(source: CaptureError) -> Self
Source§impl From<ChannelError> for StrategyError
impl From<ChannelError> for StrategyError
Source§fn from(source: ChannelError) -> Self
fn from(source: ChannelError) -> Self
Source§impl From<TransportError> for StrategyError
impl From<TransportError> for StrategyError
Source§fn from(source: TransportError) -> Self
fn from(source: TransportError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for StrategyError
impl !UnwindSafe for StrategyError
impl Freeze for StrategyError
impl Send for StrategyError
impl Sync for StrategyError
impl Unpin for StrategyError
impl UnsafeUnpin for StrategyError
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> 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