pub struct App {Show 14 fields
pub mode: AppMode,
pub active_tab: TabKind,
pub data: DataContext,
pub tabs: TabStates,
pub overlays: AppOverlays,
pub scroll_state: ScrollbarState,
pub should_quit: bool,
pub status_message: Option<String>,
pub tick: u64,
pub last_export_path: Option<String>,
pub navigation_ctx: NavigationContext,
pub security_cache: SecurityAnalysisCache,
pub compliance_state: PolicyComplianceState,
pub quality_view: Option<QualityView>,
}Expand description
Main application state
Fields§
§mode: AppModeCurrent mode (diff or view)
active_tab: TabKindActive tab
data: DataContextSBOM data, diff results, indexes, quality, and compliance
tabs: TabStatesPer-tab UI state
overlays: AppOverlaysOverlay UI state
scroll_state: ScrollbarStateScrollbar state
should_quit: boolShould quit
status_message: Option<String>Status message to display temporarily
tick: u64Animation tick counter
last_export_path: Option<String>Last exported file path
Navigation context for cross-view navigation
security_cache: SecurityAnalysisCacheSecurity analysis cache for blast radius, risk indicators, and flagged items
compliance_state: PolicyComplianceStateCompliance/policy checking state
quality_view: Option<QualityView>Quality tab ViewState implementation (proof of concept).
When present, quality tab key events are dispatched through this
ViewState instead of the direct handler. State is synced back to
tabs.quality after each event for rendering compatibility.
Implementations§
Source§impl App
impl App
Sourcepub fn ensure_compliance_results(&mut self)
pub fn ensure_compliance_results(&mut self)
Lazily compute compliance results for all standards when first needed.
Sourcepub fn toggle_help(&mut self)
pub fn toggle_help(&mut self)
Toggle help overlay
Sourcepub fn toggle_export(&mut self)
pub fn toggle_export(&mut self)
Toggle export dialog
Sourcepub fn toggle_legend(&mut self)
pub fn toggle_legend(&mut self)
Toggle legend overlay
Sourcepub fn close_overlays(&mut self)
pub fn close_overlays(&mut self)
Close all overlays
Sourcepub fn has_overlay(&self) -> bool
pub fn has_overlay(&self) -> bool
Check if any overlay is open
Sourcepub fn toggle_threshold_tuning(&mut self)
pub fn toggle_threshold_tuning(&mut self)
Toggle threshold tuning overlay
Sourcepub fn show_threshold_tuning(&mut self)
pub fn show_threshold_tuning(&mut self)
Show threshold tuning overlay and compute initial estimated matches
Sourcepub fn update_threshold_preview(&mut self)
pub fn update_threshold_preview(&mut self)
Update the estimated matches preview based on current threshold
Sourcepub fn apply_threshold(&mut self)
pub fn apply_threshold(&mut self)
Apply the tuned threshold and potentially re-diff
Sourcepub fn set_status_message(&mut self, msg: impl Into<String>)
pub fn set_status_message(&mut self, msg: impl Into<String>)
Set a temporary status message
Sourcepub fn clear_status_message(&mut self)
pub fn clear_status_message(&mut self)
Clear the status message
Sourcepub fn export(&mut self, format: ExportFormat)
pub fn export(&mut self, format: ExportFormat)
Export the current diff to a file
Sourcepub fn export_compliance(&mut self, format: ExportFormat)
pub fn export_compliance(&mut self, format: ExportFormat)
Export compliance results from the active compliance tab
Sourcepub fn run_compliance_check(&mut self)
pub fn run_compliance_check(&mut self)
Run compliance check against the current policy
Sourcepub fn toggle_compliance_details(&mut self)
pub fn toggle_compliance_details(&mut self)
Toggle compliance view details
Sourcepub fn next_policy(&mut self)
pub fn next_policy(&mut self)
Cycle to next policy preset
Sourcepub fn handle_event_result(&mut self, result: EventResult)
pub fn handle_event_result(&mut self, result: EventResult)
Handle an EventResult from a view state
This method processes the result of a view’s event handling, performing navigation, showing overlays, or setting status messages.
Sourcepub fn current_tab_target(&self) -> TabTarget
pub fn current_tab_target(&self) -> TabTarget
Get the current tab as a TabTarget
Sourcepub fn current_shortcuts(&self) -> Vec<Shortcut>
pub fn current_shortcuts(&self) -> Vec<Shortcut>
Get keyboard shortcuts for the current view
Source§impl App
impl App
Sourcepub fn new_diff(
diff_result: DiffResult,
old_sbom: NormalizedSbom,
new_sbom: NormalizedSbom,
old_raw: String,
new_raw: String,
) -> Self
pub fn new_diff( diff_result: DiffResult, old_sbom: NormalizedSbom, new_sbom: NormalizedSbom, old_raw: String, new_raw: String, ) -> Self
Create a new app for diff mode
Sourcepub fn with_enrichment_stats(
self,
old_stats: Option<EnrichmentStats>,
new_stats: Option<EnrichmentStats>,
) -> Self
pub fn with_enrichment_stats( self, old_stats: Option<EnrichmentStats>, new_stats: Option<EnrichmentStats>, ) -> Self
Set enrichment statistics for the diff mode
Sourcepub fn combined_enrichment_stats(&self) -> Option<EnrichmentStats>
pub fn combined_enrichment_stats(&self) -> Option<EnrichmentStats>
Get combined enrichment stats for display
Sourcepub fn new_view(sbom: NormalizedSbom) -> Self
pub fn new_view(sbom: NormalizedSbom) -> Self
Create a new app for view mode
Sourcepub fn new_multi_diff(result: MultiDiffResult) -> Self
pub fn new_multi_diff(result: MultiDiffResult) -> Self
Create a new app for multi-diff mode
Sourcepub fn new_timeline(result: TimelineResult) -> Self
pub fn new_timeline(result: TimelineResult) -> Self
Create a new app for timeline mode
Sourcepub fn new_matrix(result: MatrixResult) -> Self
pub fn new_matrix(result: MatrixResult) -> Self
Create a new app for matrix mode
Source§impl App
impl App
Sourcepub fn diff_component_items(
&self,
filter: ComponentFilter,
) -> Vec<&ComponentChange>
pub fn diff_component_items( &self, filter: ComponentFilter, ) -> Vec<&ComponentChange>
Build diff-mode components list in the same order as the table.
Sourcepub fn diff_component_count(&self, filter: ComponentFilter) -> usize
pub fn diff_component_count(&self, filter: ComponentFilter) -> usize
Count diff-mode components matching the filter (without building full list). More efficient than diff_component_items().len() for just getting a count.
Sourcepub fn view_component_count(&self) -> usize
pub fn view_component_count(&self) -> usize
Count view-mode components (without building full list).
Sourcepub fn view_component_items(&self) -> Vec<&Component>
pub fn view_component_items(&self) -> Vec<&Component>
Build view-mode components list in the same order as the table.
Sourcepub fn diff_vulnerability_items(&self) -> Vec<DiffVulnItem<'_>>
pub fn diff_vulnerability_items(&self) -> Vec<DiffVulnItem<'_>>
Build diff-mode vulnerabilities list in the same order as the table.
Sourcepub fn ensure_vulnerability_cache(&mut self)
pub fn ensure_vulnerability_cache(&mut self)
Ensure the vulnerability cache is populated for the current filter+sort.
Call this before diff_vulnerability_items_from_cache() to guarantee
the cache is warm.
Sourcepub fn diff_vulnerability_items_from_cache(&self) -> Vec<DiffVulnItem<'_>>
pub fn diff_vulnerability_items_from_cache(&self) -> Vec<DiffVulnItem<'_>>
Reconstruct vulnerability items from the cache (cheap pointer lookups).
Panics if the cache has not been populated. Call ensure_vulnerability_cache()
first.
Sourcepub fn diff_vulnerability_count(&self) -> usize
pub fn diff_vulnerability_count(&self) -> usize
Count diff-mode vulnerabilities matching the current filter (without building full list). More efficient than diff_vulnerability_items().len() for just getting a count.
Sourcepub fn get_new_sbom_sort_key(
&self,
id: &CanonicalId,
) -> Option<&ComponentSortKey>
pub fn get_new_sbom_sort_key( &self, id: &CanonicalId, ) -> Option<&ComponentSortKey>
Get the sort key for a component in the new SBOM (diff mode).
Returns pre-computed lowercase strings to avoid repeated allocations during sorting.
Sourcepub fn get_old_sbom_sort_key(
&self,
id: &CanonicalId,
) -> Option<&ComponentSortKey>
pub fn get_old_sbom_sort_key( &self, id: &CanonicalId, ) -> Option<&ComponentSortKey>
Get the sort key for a component in the old SBOM (diff mode).
Sourcepub fn get_sbom_sort_key(&self, id: &CanonicalId) -> Option<&ComponentSortKey>
pub fn get_sbom_sort_key(&self, id: &CanonicalId) -> Option<&ComponentSortKey>
Get the sort key for a component in the single SBOM (view mode).
Sourcepub fn get_dependencies_indexed(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
pub fn get_dependencies_indexed(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
Get dependencies of a component using the cached index (O(k) instead of O(edges)).
Sourcepub fn get_dependents_indexed(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
pub fn get_dependents_indexed(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
Get dependents of a component using the cached index (O(k) instead of O(edges)).
Source§impl App
impl App
Sourcepub fn select_tab(&mut self, tab: TabKind)
pub fn select_tab(&mut self, tab: TabKind)
Select a specific tab
Sourcepub fn select_down(&mut self)
pub fn select_down(&mut self)
Move selection down
Sourcepub fn select_first(&mut self)
pub fn select_first(&mut self)
Move selection to first item
Sourcepub fn select_last(&mut self)
pub fn select_last(&mut self)
Move selection to last item
Navigate from vulnerability to the affected component
Navigate from dependency to the component
Navigate back using breadcrumbs
Check if we have navigation history
Get the breadcrumb trail for display
Source§impl App
impl App
Sourcepub fn start_search(&mut self)
pub fn start_search(&mut self)
Start searching
Sourcepub fn stop_search(&mut self)
pub fn stop_search(&mut self)
Stop searching
Sourcepub fn search_push(&mut self, c: char)
pub fn search_push(&mut self, c: char)
Add character to search query
Sourcepub fn search_pop(&mut self)
pub fn search_pop(&mut self)
Remove character from search query
Sourcepub fn execute_search(&mut self)
pub fn execute_search(&mut self)
Execute search with current query
Sourcepub fn jump_to_search_result(&mut self)
pub fn jump_to_search_result(&mut self)
Jump to the currently selected search result
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl Sync for App
impl Unpin for App
impl UnsafeUnpin for App
impl UnwindSafe for App
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
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>
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>
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