Skip to main content

App

Struct App 

Source
pub struct App {
Show 44 fields pub categories: Vec<CleanerCategory>, pub category_index: usize, pub item_list_state: ListState, pub is_root: bool, pub is_running: bool, pub operation_start_time: Option<Instant>, pub operation_end_time: Option<Instant>, pub total_bytes_cleaned: u64, pub show_help: bool, pub result_messages: Vec<String>, pub detailed_view: bool, pub current_cleaner_index: usize, pub animation_frame: usize, pub last_frame_time: Instant, pub terminal_width: u16, pub terminal_height: u16, pub compact_mode: bool, pub show_performance_stats: bool, pub operation_count: usize, pub errors_count: usize, pub paused: bool, pub confirmation_mode: bool, pub selected_cleaners_count: usize, pub view_mode: ViewMode, pub sort_mode: SortMode, pub filter_mode: FilterMode, pub detailed_cleaned_items: Vec<DetailedCleanedItem>, pub detailed_list_scroll_state: ListState, pub search_query: String, pub search_active: bool, pub detailed_view_filter: String, pub demo_operation_timer: Option<Instant>, pub demo_operations_completed: usize, pub chart_type: ChartType, pub operation_logs: Vec<String>, pub show_progress_screen: bool, pub password_prompt: PasswordPrompt, pub needs_sudo: bool, pub pending_operations: Vec<PendingOperation>, pub awaiting_run_confirmation: bool, pub preview_open: bool, pub preview_results: Vec<(String, CleaningResult)>, pub needs_admin_notice: bool, pub pending_run_selection: Vec<PendingOperation>,
}

Fields§

§categories: Vec<CleanerCategory>§category_index: usize§item_list_state: ListState§is_root: bool§is_running: bool§operation_start_time: Option<Instant>§operation_end_time: Option<Instant>§total_bytes_cleaned: u64§show_help: bool§result_messages: Vec<String>§detailed_view: bool§current_cleaner_index: usize§animation_frame: usize§last_frame_time: Instant§terminal_width: u16§terminal_height: u16§compact_mode: bool§show_performance_stats: bool§operation_count: usize§errors_count: usize§paused: bool§confirmation_mode: bool§selected_cleaners_count: usize§view_mode: ViewMode§sort_mode: SortMode§filter_mode: FilterMode§detailed_cleaned_items: Vec<DetailedCleanedItem>§detailed_list_scroll_state: ListState§search_query: String§search_active: bool§detailed_view_filter: String§demo_operation_timer: Option<Instant>§demo_operations_completed: usize§chart_type: ChartType§operation_logs: Vec<String>§show_progress_screen: bool§password_prompt: PasswordPrompt§needs_sudo: bool§pending_operations: Vec<PendingOperation>§awaiting_run_confirmation: bool

Whether the “confirm this run” overlay is currently shown, awaiting a yes/no answer before pending_operations actually executes.

§preview_open: bool

Whether the preview (dry-run) results overlay is currently shown.

§preview_results: Vec<(String, CleaningResult)>

Results of the most recent preview run: (cleaner_name, result).

§needs_admin_notice: bool

Whether the “needs Administrator” notice is shown (Windows only; there is no interactive sudo-password flow there).

§pending_run_selection: Vec<PendingOperation>

Selected cleaners staged while awaiting_run_confirmation is true.

Implementations§

Source§

impl App

Source

pub fn new() -> Self

Source

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

Source

pub fn remove_search_char(&mut self)

Source

pub fn get_category_distribution(&self) -> Vec<(String, usize, u64)>

Source

pub fn next_item(&mut self)

Source

pub fn previous_item(&mut self)

Source

pub fn toggle_selected(&mut self)

Source

pub fn next_category(&mut self)

Source

pub fn previous_category(&mut self)

Source

pub fn toggle_help(&mut self)

Source

pub fn select_all(&mut self)

Source

pub fn deselect_all(&mut self)

Source

pub fn select_all_everywhere(&mut self)

Select every item across every category (not just the active tab).

Source

pub fn deselect_all_everywhere(&mut self)

Deselect every item across every category (not just the active tab).

Source

pub fn request_run(&mut self) -> Result<()>

Gather selected cleaners and either show the confirmation overlay (when confirmation_mode is on) or start execution immediately.

Source

pub fn confirm_pending_run(&mut self) -> Result<()>

User confirmed the run in the confirmation overlay.

Source

pub fn cancel_run_confirmation(&mut self)

User cancelled the confirmation overlay.

Source

pub fn run_preview(&mut self)

Preview (dry-run) every selected cleaner synchronously: measures real sizes/paths without deleting anything or invoking any mutating external command, and shows the results in an overlay.

Source

pub fn close_preview(&mut self)

Close the preview results overlay.

Source

pub fn start_operations_for_tests( &mut self, selected_cleaners: &[PendingOperation], )

Test-only public wrapper around the private Self::start_operations, so integration tests in tests/ (a separate crate, which can only see pub items) can drive the exact same post-authentication code path handle_key uses. Only compiled into debug builds.

Source

pub fn update_animation(&mut self)

Source

pub fn update_demo_operations(&mut self)

Source

pub fn cancel_sudo_operations(&mut self)

Source

pub fn handle_key(&mut self, key: KeyEvent) -> Result<bool>

Source

pub fn handle_resize(&mut self, width: u16, height: u16)

Source

pub fn toggle_compact_mode(&mut self)

Source

pub fn toggle_auto_scroll(&mut self)

Source

pub fn toggle_performance_stats(&mut self)

Source

pub fn cycle_view_mode(&mut self)

Source

pub fn cycle_sort_mode(&mut self)

Source

pub fn cycle_filter_mode(&mut self)

Source

pub fn toggle_pause(&mut self)

Source

pub fn toggle_confirmation_mode(&mut self)

Source

pub fn update_counters(&mut self)

Source

pub fn clear_errors(&mut self)

Source

pub fn get_elapsed_time(&self) -> String

Source

pub fn add_detailed_cleaned_item( &mut self, path: String, size: u64, category: String, cleaner_name: String, item_type: CleanedItemType, )

Source

pub fn scroll_detailed_list_up(&mut self)

Source

pub fn scroll_detailed_list_down(&mut self)

Source

pub fn get_filtered_detailed_items(&self) -> Vec<&DetailedCleanedItem>

Source

pub fn toggle_chart_type(&mut self)

Trait Implementations§

Source§

impl Default for App

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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