pub struct State {Show 21 fields
pub now: SystemTime,
pub all: Vec<Cache>,
pub sort: Sort,
pub marks: MarkSet,
pub cursor: usize,
pub files_cursor: usize,
pub floor: FloorPolicy,
pub focus_right: bool,
pub stack: Vec<Vec<Cache>>,
pub stack_labels: Vec<String>,
pub quit: bool,
pub modal: Modal,
pub dry_run: bool,
pub yes_mode: bool,
pub total_freed: u64,
pub filter: Option<Filter>,
pub loading: Option<Loading>,
pub overlay: Option<Overlay>,
pub level_dirty: bool,
pub drill_paths: Vec<PathBuf>,
pub cursor_stack: Vec<usize>,
}Fields§
§now: SystemTime§all: Vec<Cache>§sort: Sort§marks: MarkSet§cursor: usize§files_cursor: usize§floor: FloorPolicy§focus_right: bool§stack: Vec<Vec<Cache>>§stack_labels: Vec<String>§quit: bool§modal: Modal§dry_run: bool§yes_mode: bool§total_freed: u64Bytes freed across all deletion passes in this session.
filter: Option<Filter>When Some, a less/vim-style / filter is active (possibly being
edited). When None, no filter is applied.
loading: Option<Loading>Some while a background drill-in scan is running; drives the
spinner modal.
overlay: Option<Overlay>Some for ~2 s after a delete pass completes; draws the result
overlay until Msg::OverlayDismiss is received.
level_dirty: boolSet to true whenever something was successfully deleted at the current drill level. Reset on drill in/out. When we drill out and this was true, the parent’s row for the cache we’re leaving is re-scanned to reflect the smaller size.
drill_paths: Vec<PathBuf>Path stack parallel to stack so we know which entry in the
restored parent corresponds to the cache we just drilled out of.
Pushed on drill_into, popped on drill_out.
cursor_stack: Vec<usize>Cursor positions parallel to stack. On drill_into we save the
current cursor; on drill_out we restore it (then clamp), so the
user lands back on the row they were on instead of at the top.
Implementations§
Source§impl State
impl State
pub fn sorted_indices(&self) -> Vec<usize>
pub fn drill_into(&mut self, children: Vec<Cache>)
pub fn drill_out(&mut self)
Sourcepub fn drill_out_with_path(&mut self) -> Option<PathBuf>
pub fn drill_out_with_path(&mut self) -> Option<PathBuf>
Same as drill_out but also returns the path of the cache we just
left (for the event loop to trigger a refresh). Returns None
when already at the top level.
Auto Trait Implementations§
impl Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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