pub struct App {Show 24 fields
pub state: AppState,
pub scan_mode: ScanMode,
pub menu_index: usize,
pub projects: Vec<ProjectEntry>,
pub caches: Vec<CacheEntry>,
pub cleaners: Vec<CleanerEntry>,
pub selected: usize,
pub scroll_offset: usize,
pub expanded: HashSet<usize>,
pub status_message: Option<String>,
pub should_quit: bool,
pub show_help: bool,
pub current_tab: usize,
pub tabs: Vec<String>,
pub search_query: String,
pub is_searching: bool,
pub scan_paths: Vec<PathBuf>,
pub scan_progress: f64,
pub scan_message: String,
pub dirs_scanned: usize,
pub total_size: u64,
pub anim_frame: usize,
pub permanent_delete: bool,
pub pending_delete_items: Vec<(PathBuf, Option<String>)>,
/* private fields */
}Expand description
Main TUI application state
Fields§
§state: AppStateCurrent screen/state
scan_mode: ScanModeSelected scan mode
Menu selection index (for ready screen)
projects: Vec<ProjectEntry>Projects to display
caches: Vec<CacheEntry>Caches to display
cleaners: Vec<CleanerEntry>Cleaner items to display
selected: usizeCurrently selected index
scroll_offset: usizeScroll offset for the list
expanded: HashSet<usize>Expanded project indices
status_message: Option<String>Status message
should_quit: boolShould quit
show_help: boolShow help popup
current_tab: usizeCurrent tab/category
tabs: Vec<String>Available tabs
search_query: StringSearch query
is_searching: boolIs searching
scan_paths: Vec<PathBuf>Scan paths
scan_progress: f64Scan progress (0.0 - 1.0)
scan_message: StringScan message
dirs_scanned: usizeDirectories scanned
total_size: u64Total size found
anim_frame: usizeAnimation frame counter
permanent_delete: boolUse permanent delete (rm -rf) instead of trash
pending_delete_items: Vec<(PathBuf, Option<String>)>Items pending deletion (path, optional clean_command)
Implementations§
Source§impl App
impl App
Sourcepub fn toggle_permanent_delete(&mut self)
pub fn toggle_permanent_delete(&mut self)
Toggle permanent delete option
Sourcepub fn tick_animation(&mut self)
pub fn tick_animation(&mut self)
Tick the animation frame (call on every tick for smooth animations)
Move menu selection up
Move menu selection down
Sourcepub fn start_scan(&mut self)
pub fn start_scan(&mut self)
Start scanning based on current mode
Sourcepub fn check_scan_progress(&mut self)
pub fn check_scan_progress(&mut self)
Check for scan updates (call this on tick)
Sourcepub fn select_down(&mut self)
pub fn select_down(&mut self)
Move selection down
Sourcepub fn ensure_visible_with_height(&mut self, viewport_height: usize)
pub fn ensure_visible_with_height(&mut self, viewport_height: usize)
Ensure selected item is visible with viewport height
Sourcepub fn toggle_select(&mut self)
pub fn toggle_select(&mut self)
Toggle selection of current item
Sourcepub fn toggle_expand(&mut self)
pub fn toggle_expand(&mut self)
Toggle expanded state of current item
Sourcepub fn scroll_down(&mut self)
pub fn scroll_down(&mut self)
Scroll down by one item
Sourcepub fn select_all(&mut self)
pub fn select_all(&mut self)
Select all visible items
Sourcepub fn deselect_all(&mut self)
pub fn deselect_all(&mut self)
Deselect all items
Sourcepub fn visible_projects(&self) -> Vec<&ProjectEntry>
pub fn visible_projects(&self) -> Vec<&ProjectEntry>
Get visible projects
Sourcepub fn visible_count(&self) -> usize
pub fn visible_count(&self) -> usize
Count visible projects
Sourcepub fn selected_projects(&self) -> Vec<&ProjectEntry>
pub fn selected_projects(&self) -> Vec<&ProjectEntry>
Get selected projects
Sourcepub fn selected_size(&self) -> u64
pub fn selected_size(&self) -> u64
Get total selected size
Sourcepub fn selected_count(&self) -> usize
pub fn selected_count(&self) -> usize
Get number of selected items
Sourcepub fn filter_by_tab(&mut self)
pub fn filter_by_tab(&mut self)
Filter projects by current tab
Sourcepub fn toggle_help(&mut self)
pub fn toggle_help(&mut self)
Toggle help
Sourcepub fn start_search(&mut self)
pub fn start_search(&mut self)
Enter search mode
Sourcepub fn end_search(&mut self)
pub fn end_search(&mut self)
Exit search mode
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 last character from search query
Sourcepub fn current_project(&self) -> Option<&ProjectEntry>
pub fn current_project(&self) -> Option<&ProjectEntry>
Get current project (selected)
Sourcepub fn is_expanded(&self, visible_index: usize) -> bool
pub fn is_expanded(&self, visible_index: usize) -> bool
Is project expanded
Sourcepub fn request_delete(&mut self)
pub fn request_delete(&mut self)
Request deletion confirmation
Sourcepub fn cancel_delete(&mut self)
pub fn cancel_delete(&mut self)
Cancel deletion
Sourcepub fn start_delete(&mut self)
pub fn start_delete(&mut self)
Start deletion - collects paths and sets Cleaning state Actual deletion happens on next tick to allow UI to render
Sourcepub fn has_pending_delete(&self) -> bool
pub fn has_pending_delete(&self) -> bool
Check if we have pending deletions to process
Sourcepub fn take_pending_delete_items(&mut self) -> Vec<(PathBuf, Option<String>)>
pub fn take_pending_delete_items(&mut self) -> Vec<(PathBuf, Option<String>)>
Take pending delete items (clears them)
Sourcepub fn deletion_complete(
&mut self,
success_count: usize,
fail_count: usize,
freed: u64,
)
pub fn deletion_complete( &mut self, success_count: usize, fail_count: usize, freed: u64, )
Mark deletion complete
Trait Implementations§
Auto Trait Implementations§
impl Freeze for App
impl RefUnwindSafe for App
impl Send for App
impl !Sync for App
impl Unpin 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> 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