pub struct ScanProgress { /* private fields */ }Expand description
What a journal needs from a running scan, and nothing more.
See ScanContext::progress for why a journal gets this and not a context.
Implementations§
Source§impl ScanProgress
impl ScanProgress
Sourcepub fn settlements(&self) -> &Settlements
pub fn settlements(&self) -> &Settlements
How far the scan has got, and what became of what it did not settle.
Sourcepub fn take_changed_hosts(&self) -> Vec<Host>
pub fn take_changed_hosts(&self) -> Vec<Host>
Takes the hosts whose findings have changed since this was last called.
Sourcepub fn take_tapes(&self) -> Vec<DetectionRunRecord>
pub fn take_tapes(&self) -> Vec<DetectionRunRecord>
Takes the detection tapes captured since this was last called, for the journal to write down.
Sourcepub fn hosts_snapshot(&self) -> Vec<Host>
pub fn hosts_snapshot(&self) -> Vec<Host>
Every host found so far, cloned, ordered by the address each is keyed under.
Ordered because a journal compaction writes these to disk, and the same findings should produce the same file.
Sourcepub fn host_count(&self) -> usize
pub fn host_count(&self) -> usize
How many hosts have been found so far.
Sourcepub fn record_failure(&self, scanner: ScannerKind, reason: String)
pub fn record_failure(&self, scanner: ScannerKind, reason: String)
Files a failure to the report, without an event; see
ScanContext::progress.
Logged under the failing strategy’s name, as
ScanContext::record_failure logs it.
Trait Implementations§
Source§impl Clone for ScanProgress
impl Clone for ScanProgress
Auto Trait Implementations§
impl !RefUnwindSafe for ScanProgress
impl !UnwindSafe for ScanProgress
impl Freeze for ScanProgress
impl Send for ScanProgress
impl Sync for ScanProgress
impl Unpin for ScanProgress
impl UnsafeUnpin for ScanProgress
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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