Skip to main content

App

Struct App 

Source
pub struct App { /* private fields */ }
Expand description

Main application state

Implementations§

Source§

impl App

Source

pub fn ensure_compliance_results(&mut self)

Lazily compute compliance results for all standards when first needed.

Each SBOM’s optional CRA sidecar is threaded into its checkers so sidecar-driven verdicts — most importantly EU AI Act high-risk escalation — match the CLI. Without it a high-risk AI SBOM the CLI marks NON-COMPLIANT would render COMPLIANT in the diff compliance tab.

Source

pub const fn toggle_export(&mut self)

Toggle export dialog

Source

pub const fn toggle_legend(&mut self)

Toggle legend overlay

Source

pub const fn close_overlays(&mut self)

Close all overlays

Source

pub const fn has_overlay(&self) -> bool

Check if any overlay is open

Source

pub fn toggle_threshold_tuning(&mut self)

Toggle threshold tuning overlay

Source

pub fn show_threshold_tuning(&mut self)

Show threshold tuning overlay and compute initial estimated matches

Source

pub fn update_threshold_preview(&mut self)

Update the estimated matches preview based on current threshold

Source

pub fn apply_threshold(&mut self)

Apply the tuned threshold and potentially re-diff

Source

pub fn set_status_message(&mut self, msg: impl Into<String>)

Set a temporary status message

Source

pub fn clear_status_message(&mut self)

Clear the status message.

If status_sticky is set the message is kept for one extra keypress, then cleared on the subsequent call.

Source

pub fn export(&mut self, format: ExportFormat)

Export the current diff to a file.

The export is scoped to the active tab: e.g. if the user is on the Vulnerabilities tab only vulnerability data is included.

Source

pub fn export_compliance(&mut self, format: ExportFormat)

Export compliance results from the active compliance tab

Source

pub fn export_matrix(&mut self, format: ExportFormat)

Export matrix results to a file

Source

pub fn run_compliance_check(&mut self)

Run compliance check against the current policy

Source

pub const fn toggle_compliance_details(&mut self)

Toggle compliance view details

Source

pub fn next_policy(&mut self)

Cycle to next policy preset

Source

pub const fn view_mode(&self) -> ViewMode

Get the current view mode for ViewContext

Source

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.

Source

pub const fn current_tab_target(&self) -> TabTarget

Get the current tab as a TabTarget

Source

pub fn prepare_render(&mut self)

Prepare mutable state that render functions previously computed inline.

Call this once per frame, before creating a RenderContext. After this method returns, all render functions can operate on &App (read-only) instead of &mut App.

Source§

impl App

Source

pub fn new_diff( diff_result: DiffResult, old_sbom: NormalizedSbom, new_sbom: NormalizedSbom, old_raw: &str, new_raw: &str, ) -> Self

Create a new app for diff mode

Source

pub fn with_cra_sidecars( self, old_sidecar: Option<CraSidecarMetadata>, new_sidecar: Option<CraSidecarMetadata>, ) -> Self

Attach per-SBOM CRA sidecar metadata so the compliance tab renders sidecar-driven verdicts (EU AI Act high-risk escalation, OSS-Steward, EUCC, Article 14) identically to the CLI reports. Each side of the diff is judged against its own sidecar. Invalidates any cached compliance results so the sidecars take effect on the next ensure_compliance_results, and recomputes the summary-card CRA Phase 2 results (pre-computed bare in new_diff) so the summary tab agrees with the compliance tab.

Source

pub fn with_enrichment_stats( self, old_stats: Option<EnrichmentStats>, new_stats: Option<EnrichmentStats>, ) -> Self

Set enrichment statistics for the diff mode

Source

pub fn combined_enrichment_stats(&self) -> Option<EnrichmentStats>

Get combined enrichment stats for display

Source

pub fn new_multi_diff(result: MultiDiffResult) -> Self

Create a new app for multi-diff mode

Source

pub fn new_timeline(result: TimelineResult) -> Self

Create a new app for timeline mode

Source

pub fn new_matrix(result: MatrixResult) -> Self

Create a new app for matrix mode

Source§

impl App

Source

pub fn diff_component_items( &self, filter: ComponentFilter, ) -> Vec<&ComponentChange>

Build diff-mode components list in the same order as the table.

Source

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.

Source

pub fn diff_vulnerability_items(&self) -> Vec<DiffVulnItem<'_>>

Build diff-mode vulnerabilities list in the same order as the table.

Source

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.

Source

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.

Source

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.

Falls back to the full list when the advanced composable filter is active, since it needs DiffVulnItem references to check multi-criteria.

Source

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.

Source

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).

Source

pub fn get_sbom_sort_key(&self, id: &CanonicalId) -> Option<&ComponentSortKey>

Get the sort key for a component in the single SBOM (view mode).

Source

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)).

Source

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

Source

pub fn next_tab(&mut self)

Switch to next tab

Source

pub fn prev_tab(&mut self)

Switch to previous tab

Source

pub const fn select_tab(&mut self, tab: TabKind)

Select a specific tab

Source

pub fn select_up(&mut self)

Move selection up

Source

pub fn select_down(&mut self)

Move selection down

Source

pub fn select_first(&mut self)

Move selection to first item

Source

pub fn select_last(&mut self)

Move selection to last item

Source

pub fn page_up(&mut self)

Page up

Source

pub fn page_down(&mut self)

Page down

Source

pub fn navigate_vuln_to_component( &mut self, vuln_id: &str, component_name: &str, )

Navigate from vulnerability to the affected component

Source

pub fn navigate_dep_to_component(&mut self, dep_name: &str)

Navigate from dependency to the component

Source

pub fn navigate_back(&mut self) -> bool

Navigate back using breadcrumbs

Source

pub fn has_navigation_history(&self) -> bool

Check if we have navigation history

Source

pub fn breadcrumb_trail(&self) -> String

Get the breadcrumb trail for display

Source§

impl App

Start searching

Stop searching

Source

pub fn search_push(&mut self, c: char)

Add character to search query

Source

pub fn search_pop(&mut self)

Remove character from search query

Execute search with current query

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more