pub struct PersistedScan {
pub scan_id: ScanId,
pub username: String,
pub site_count: usize,
pub created_at_ms: u64,
pub summary: Summary,
pub outcomes: Vec<CheckOutcome>,
pub elapsed_ms: u64,
}Expand description
Self-contained snapshot of a completed scan. Round-trips losslessly through JSON; tests assert that.
Fields§
§scan_id: ScanIdStable identifier — same value as in-memory ScanId.
username: StringUsername that was scanned.
site_count: usizeTotal number of sites probed in this scan.
created_at_ms: u64Unix epoch milliseconds when the scan was started.
summary: SummaryPer-verdict tally over Self::outcomes.
outcomes: Vec<CheckOutcome>All outcomes, in completion order.
elapsed_ms: u64Wall-clock duration, milliseconds.
Implementations§
Source§impl PersistedScan
impl PersistedScan
Sourcepub fn from_finished(
scan_id: ScanId,
username: String,
site_count: usize,
created_at_ms: u64,
finished: FinishedScan,
) -> Self
pub fn from_finished( scan_id: ScanId, username: String, site_count: usize, created_at_ms: u64, finished: FinishedScan, ) -> Self
Build a snapshot from a freshly-completed in-memory scan.
Trait Implementations§
Source§impl Clone for PersistedScan
impl Clone for PersistedScan
Source§fn clone(&self) -> PersistedScan
fn clone(&self) -> PersistedScan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PersistedScan
impl Debug for PersistedScan
Source§impl<'de> Deserialize<'de> for PersistedScan
impl<'de> Deserialize<'de> for PersistedScan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PersistedScan
impl RefUnwindSafe for PersistedScan
impl Send for PersistedScan
impl Sync for PersistedScan
impl Unpin for PersistedScan
impl UnsafeUnpin for PersistedScan
impl UnwindSafe for PersistedScan
Blanket Implementations§
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