pub enum Effect {
None,
Quit,
Plan(Vec<Target>),
Delete(Vec<PathBuf>),
Price(Vec<PathBuf>),
}Expand description
What the event loop has to do about a keystroke, once the view has done its part.
Variants§
None
Nothing outside the view.
Quit
Put the terminal back.
Plan(Vec<Target>)
Resolve these into a Plan and hand it back with View::ask.
The view never plans, because planning is filesystem work — every path resolved, every check in the safety model applied — and this file has none.
Targets rather than paths, and the difference is the whole answer to “how much do
I get back”: a target carries what the scan priced, and one built from a bare path
carries Size::Unmeasured. Handing the planner paths made the confirmation offer to
delete 196 KiB of node_modules “giving back 0 B”, with the tree saying otherwise two
lines above it.
Delete(Vec<PathBuf>)
The question was answered yes. Remove exactly these.
Price(Vec<PathBuf>)
Trait Implementations§
impl Eq for Effect
impl StructuralPartialEq for Effect
Auto Trait Implementations§
impl Freeze for Effect
impl RefUnwindSafe for Effect
impl Send for Effect
impl Sync for Effect
impl Unpin for Effect
impl UnsafeUnpin for Effect
impl UnwindSafe for Effect
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
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 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> ⓘ
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