pub struct ReversibilityReport {
pub dangerous: usize,
pub reversible: usize,
pub irreversible: usize,
pub score: f64,
pub recoverable: bool,
}Expand description
How much of a program’s dangerous blast radius is reversible — backed by an
undo/rollback (transaction, trash, snapshot) rather than permanent. Gating (see
assess_safety) bounds whether a dangerous effect runs; reversibility bounds
the damage if it does. Together they describe the real recoverable blast radius.
Fields§
§dangerous: usizeNumber of dangerous effects considered.
reversible: usizeDangerous effects that are reversible (an undo/rollback exists).
irreversible: usizeDangerous effects with no undo path.
score: f64Fraction of dangerous effects that are reversible (1.0 if none are dangerous).
recoverable: boolTrue iff every dangerous effect is reversible — the blast radius is recoverable.
Trait Implementations§
Source§impl Clone for ReversibilityReport
impl Clone for ReversibilityReport
Source§fn clone(&self) -> ReversibilityReport
fn clone(&self) -> ReversibilityReport
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 ReversibilityReport
impl Debug for ReversibilityReport
Source§impl Display for ReversibilityReport
impl Display for ReversibilityReport
Auto Trait Implementations§
impl Freeze for ReversibilityReport
impl RefUnwindSafe for ReversibilityReport
impl Send for ReversibilityReport
impl Sync for ReversibilityReport
impl Unpin for ReversibilityReport
impl UnsafeUnpin for ReversibilityReport
impl UnwindSafe for ReversibilityReport
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