pub struct ViewApp {Show 28 fields
pub sbom: NormalizedSbom,
pub active_tab: ViewTab,
pub tree_state: TreeState,
pub tree_group_by: TreeGroupBy,
pub tree_filter: TreeFilter,
pub tree_search_query: String,
pub tree_search_active: bool,
pub selected_component: Option<String>,
pub component_tab: ComponentDetailTab,
pub vuln_state: VulnExplorerState,
pub license_state: LicenseViewState,
pub dependency_state: DependencyViewState,
pub search_state: SearchState,
pub focus_panel: FocusPanel,
pub show_help: bool,
pub show_export: bool,
pub show_legend: bool,
pub status_message: Option<String>,
pub navigation_ctx: ViewNavigationContext,
pub should_quit: bool,
pub tick: u64,
pub stats: SbomStats,
pub quality_report: QualityReport,
pub quality_state: QualityViewState,
pub compliance_results: Option<Vec<ComplianceResult>>,
pub compliance_state: StandardComplianceState,
pub sbom_index: NormalizedSbomIndex,
pub source_state: SourcePanelState,
}Expand description
Main application state for single SBOM viewing.
Fields§
§sbom: NormalizedSbomThe SBOM being viewed
active_tab: ViewTabCurrent active view/tab
tree_state: TreeStateTree navigation state
tree_group_by: TreeGroupByCurrent tree grouping mode
tree_filter: TreeFilterCurrent tree filter
tree_search_query: StringTree search query (inline filter)
tree_search_active: boolWhether tree search is active
selected_component: Option<String>Selected component ID (for detail panel)
component_tab: ComponentDetailTabComponent detail sub-tab
vuln_state: VulnExplorerStateVulnerability explorer state
license_state: LicenseViewStateLicense view state
dependency_state: DependencyViewStateDependency view state
search_state: SearchStateGlobal search state
focus_panel: FocusPanelFocus panel (left list vs right detail)
show_help: boolShow help overlay
show_export: boolShow export dialog
show_legend: boolShow legend overlay
status_message: Option<String>Status message to display temporarily
Navigation context for breadcrumbs
should_quit: boolShould quit
tick: u64Animation tick counter
stats: SbomStatsCached statistics
quality_report: QualityReportQuality report for the SBOM
quality_state: QualityViewStateQuality view state
compliance_results: Option<Vec<ComplianceResult>>Compliance validation results for all standards (lazily computed)
compliance_state: StandardComplianceStateCompliance view state
sbom_index: NormalizedSbomIndexPrecomputed index for fast lookups
source_state: SourcePanelStateSource tab state
Implementations§
Source§impl ViewApp
impl ViewApp
Sourcepub fn new(sbom: NormalizedSbom, raw_content: String) -> Self
pub fn new(sbom: NormalizedSbom, raw_content: String) -> Self
Create a new ViewApp for the given SBOM.
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 select_tab(&mut self, tab: ViewTab)
pub fn select_tab(&mut self, tab: ViewTab)
Select a specific tab.
Sourcepub fn get_sort_key(&self, id: &CanonicalId) -> Option<&ComponentSortKey>
pub fn get_sort_key(&self, id: &CanonicalId) -> Option<&ComponentSortKey>
Get the sort key for a component using the cached index.
Returns pre-computed lowercase strings to avoid repeated allocations during sorting.
Sourcepub fn get_dependencies(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
pub fn get_dependencies(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
Get dependencies of a component using the cached index (O(k) instead of O(edges)).
Sourcepub fn get_dependents(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
pub fn get_dependents(&self, id: &CanonicalId) -> Vec<&DependencyEdge>
Get dependents of a component using the cached index (O(k) instead of O(edges)).
Sourcepub fn search_components_by_name(&self, query: &str) -> Vec<&Component>
pub fn search_components_by_name(&self, query: &str) -> Vec<&Component>
Search components by name using the cached index.
Sourcepub fn toggle_focus(&mut self)
pub fn toggle_focus(&mut self)
Toggle focus between left and right panels.
Sourcepub fn start_search(&mut self)
pub fn start_search(&mut self)
Start search mode.
Sourcepub fn stop_search(&mut self)
pub fn stop_search(&mut self)
Stop search mode.
Sourcepub fn execute_search(&mut self)
pub fn execute_search(&mut self)
Execute search with current query.
Sourcepub fn get_selected_component(&self) -> Option<&Component>
pub fn get_selected_component(&self) -> Option<&Component>
Get the currently selected component.
Sourcepub fn jump_to_component_in_tree(&mut self, component_id: &str) -> bool
pub fn jump_to_component_in_tree(&mut self, component_id: &str) -> bool
Jump tree selection to a component, expanding its group if needed.
Sourcepub fn toggle_tree_grouping(&mut self)
pub fn toggle_tree_grouping(&mut self)
Toggle tree grouping mode.
Sourcepub fn toggle_tree_filter(&mut self)
pub fn toggle_tree_filter(&mut self)
Toggle tree filter.
Sourcepub fn start_tree_search(&mut self)
pub fn start_tree_search(&mut self)
Start tree search mode.
Sourcepub fn stop_tree_search(&mut self)
pub fn stop_tree_search(&mut self)
Stop tree search mode.
Sourcepub fn clear_tree_search(&mut self)
pub fn clear_tree_search(&mut self)
Clear tree search and exit search mode.
Sourcepub fn tree_search_push_char(&mut self, c: char)
pub fn tree_search_push_char(&mut self, c: char)
Add character to tree search query.
Sourcepub fn tree_search_pop_char(&mut self)
pub fn tree_search_pop_char(&mut self)
Remove character from tree search query.
Sourcepub fn next_component_tab(&mut self)
pub fn next_component_tab(&mut self)
Cycle to next component detail tab.
Sourcepub fn prev_component_tab(&mut self)
pub fn prev_component_tab(&mut self)
Cycle to previous component detail tab.
Sourcepub fn select_component_tab(&mut self, tab: ComponentDetailTab)
pub fn select_component_tab(&mut self, tab: ComponentDetailTab)
Select a specific component detail tab.
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 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 SBOM to a file.
Sourcepub fn export_compliance(&mut self, format: ExportFormat)
pub fn export_compliance(&mut self, format: ExportFormat)
Export compliance results from the compliance tab
Handle navigation in current view.
Handle navigation in current view.
Sourcepub fn handle_enter(&mut self)
pub fn handle_enter(&mut self)
Handle enter/select action.
Sourcepub fn handle_source_map_enter(&mut self)
pub fn handle_source_map_enter(&mut self)
Jump the source panel to the section selected in the map.
Sourcepub fn get_map_context_component_id(&self) -> Option<String>
pub fn get_map_context_component_id(&self) -> Option<String>
Get the component ID currently shown in the source map context footer. Returns the canonical ID value string if inside the “components” section.
Sourcepub fn get_selected_dependency_node_id(&self) -> Option<String>
pub fn get_selected_dependency_node_id(&self) -> Option<String>
Get the currently selected dependency node ID (if any).
Sourcepub fn build_tree_nodes(&self) -> Vec<TreeNode>
pub fn build_tree_nodes(&self) -> Vec<TreeNode>
Build tree nodes based on current grouping.
Auto Trait Implementations§
impl Freeze for ViewApp
impl RefUnwindSafe for ViewApp
impl Send for ViewApp
impl Sync for ViewApp
impl Unpin for ViewApp
impl UnsafeUnpin for ViewApp
impl UnwindSafe for ViewApp
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