pub struct SecurityAnalysisCache {
pub blast_radius_cache: HashMap<String, BlastRadius>,
pub risk_indicators_cache: HashMap<String, RiskIndicators>,
pub flagged_items: Vec<FlaggedItem>,
pub flagged_set: HashSet<String>,
}Expand description
Security analysis cache for the TUI
Fields§
§blast_radius_cache: HashMap<String, BlastRadius>Cached blast radius for components
risk_indicators_cache: HashMap<String, RiskIndicators>Cached risk indicators
flagged_items: Vec<FlaggedItem>Flagged items for follow-up
flagged_set: HashSet<String>Components flagged (for quick lookup)
Implementations§
Source§impl SecurityAnalysisCache
impl SecurityAnalysisCache
pub fn new() -> Self
Sourcepub fn compute_blast_radius(
&mut self,
component_id: &str,
reverse_graph: &HashMap<String, Vec<String>>,
) -> &BlastRadius
pub fn compute_blast_radius( &mut self, component_id: &str, reverse_graph: &HashMap<String, Vec<String>>, ) -> &BlastRadius
Compute blast radius for a component using reverse dependency graph
Sourcepub fn flag_component(&mut self, component_id: &str, reason: &str)
pub fn flag_component(&mut self, component_id: &str, reason: &str)
Flag a component for follow-up
Sourcepub fn unflag_component(&mut self, component_id: &str)
pub fn unflag_component(&mut self, component_id: &str)
Unflag a component
Sourcepub fn toggle_flag(&mut self, component_id: &str, reason: &str)
pub fn toggle_flag(&mut self, component_id: &str, reason: &str)
Toggle flag status
Sourcepub fn is_flagged(&self, component_id: &str) -> bool
pub fn is_flagged(&self, component_id: &str) -> bool
Check if a component is flagged
Sourcepub fn invalidate(&mut self, component_id: &str)
pub fn invalidate(&mut self, component_id: &str)
Invalidate cache for a specific component
Trait Implementations§
Source§impl Debug for SecurityAnalysisCache
impl Debug for SecurityAnalysisCache
Source§impl Default for SecurityAnalysisCache
impl Default for SecurityAnalysisCache
Source§fn default() -> SecurityAnalysisCache
fn default() -> SecurityAnalysisCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SecurityAnalysisCache
impl RefUnwindSafe for SecurityAnalysisCache
impl Send for SecurityAnalysisCache
impl Sync for SecurityAnalysisCache
impl Unpin for SecurityAnalysisCache
impl UnsafeUnpin for SecurityAnalysisCache
impl UnwindSafe for SecurityAnalysisCache
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> 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