pub struct SimReport {
pub suite: String,
pub seed: u64,
pub summary: SimSummary,
pub results: Vec<AttackResult>,
pub time_budget_exceeded: bool,
pub skipped_phases: Vec<String>,
pub phases_not_attempted: Vec<String>,
}Fields§
§suite: String§seed: u64§summary: SimSummary§results: Vec<AttackResult>§time_budget_exceeded: boolTrue when suite exited early due to time budget
skipped_phases: Vec<String>Phases skipped when time budget exceeded
phases_not_attempted: Vec<String>Phases this tier does not run at all, named so a clean summary cannot be read as “everything was tried”.
Deliberately not merged with skipped_phases: a phase absent because the
tier never includes it is a programme statement, and a phase dropped
because the budget ran out is a degradation. A reader deciding whether a
bypassed=0 run is reassuring needs to tell those apart.
Implementations§
Source§impl SimReport
impl SimReport
pub fn new(suite: &str, seed: u64) -> Self
Sourcepub fn set_phases_not_attempted(&mut self, not_attempted: Vec<String>)
pub fn set_phases_not_attempted(&mut self, not_attempted: Vec<String>)
Record the phases this tier never runs.
total counts what ran, so without this a tier that omits a whole phase
and a tier that ran everything produce the same shape of clean report.
pub fn set_time_budget_exceeded(&mut self, skipped: Vec<String>)
pub fn add_attack( &mut self, name: &str, result: Result<(ErrorClass, ErrorCode, String), Error>, duration_ms: u64, )
Sourcepub fn add_result(&mut self, result: AttackResult)
pub fn add_result(&mut self, result: AttackResult)
Add a pre-built AttackResult directly.
pub fn add_check(&mut self, name: &str, result: Result<()>, duration_ms: u64)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimReport
impl RefUnwindSafe for SimReport
impl Send for SimReport
impl Sync for SimReport
impl Unpin for SimReport
impl UnsafeUnpin for SimReport
impl UnwindSafe for SimReport
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
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