#[non_exhaustive]pub enum ScanError {
TaskFailed {
panicked: bool,
detail: String,
},
WrongPhase,
PlanChanged(PlanChanged),
OptionChanged(OptionChanged),
Evasion(EvasionError),
TooFewDescriptors {
limit: usize,
needed: usize,
},
}Expand description
An error returned when a scan fails to run to completion.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TaskFailed
The scan task did not run to completion.
Reached on a panic inside the engine or on the runtime shutting down
under it. A stop through
ScanHandle::abort still
yields a report. A panic carries its message so the caller has something
to report upstream.
Fields
WrongPhase
The journal handed to a scan records the engine’s other phase.
A sweep counts addresses and a port scan counts address-and-port pairs, so one continued as the other would skip targets nothing ever probed.
PlanChanged(PlanChanged)
journal-format only.This run’s settings would not produce the plan the journal is counted in.
OptionChanged(OptionChanged)
journal-format only.This run asks for an option the job its journal records did not run under.
A sitting under a different technique, retry policy or set of passes
answers a different question, and its results would be mixed into one
report with the earlier sittings’. See
JobOptions for which options
are held, and JobOptions::apply_to
for continuing a job under the ones it recorded.
Evasion(EvasionError)
The evasion profile is not one a scan could put on the wire.
Checked once before anything is sent, since a profile every probe refuses
would report an empty network. See
EvasionProfile::validate for what the
check covers.
TooFewDescriptors
The process may hold too few file descriptors for a scan to keep a socket for its connections beside what the rest of the process needs, counting what it holds open when the scan starts where that can be counted.
Checked before anything is sent, since the scan’s connections and the process’s other files, a journal among them, would otherwise run out of descriptors partway through. The engine never raises the limit; a caller raises its own soft limit, within the hard one, before starting a scan.
Trait Implementations§
Source§impl Error for ScanError
impl Error for ScanError
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<EvasionError> for ScanError
impl From<EvasionError> for ScanError
Source§fn from(source: EvasionError) -> Self
fn from(source: EvasionError) -> Self
Source§impl From<OptionChanged> for ScanError
impl From<OptionChanged> for ScanError
Source§fn from(source: OptionChanged) -> Self
fn from(source: OptionChanged) -> Self
Source§impl From<PlanChanged> for ScanError
impl From<PlanChanged> for ScanError
Source§fn from(source: PlanChanged) -> Self
fn from(source: PlanChanged) -> Self
Auto Trait Implementations§
impl Freeze for ScanError
impl RefUnwindSafe for ScanError
impl Send for ScanError
impl Sync for ScanError
impl Unpin for ScanError
impl UnsafeUnpin for ScanError
impl UnwindSafe for ScanError
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