pub enum Order {
Size,
Path,
Age,
}Expand description
How a level orders its children.
Per level, because a tree and a global sort are not compatible: children have to stay under their parent, so the only ordering a tree can express is a sibling ordering.
Variants§
Size
Biggest subtree first — what the tool is for.
Path
By name, which is the only order that does not move while the scan is running.
Age
Stalest first: the subtree nothing has touched for longest, first.
The opposite direction from Size and deliberately so — both put the
best candidate for deletion at the top, and “sorted by age” meaning “newest first”
would put the one directory you are still building at the top of a cleanup list.
Implementations§
Source§impl Order
impl Order
Sourcepub fn column(self) -> &'static str
pub fn column(self) -> &'static str
What the tree’s column heading calls the column this orders by.
Not Order::label, which is what the footer calls the sort. The column over the
names is headed directory, because that is what is under it; the footer says
sort (path), because that is the key being cycled.
Trait Implementations§
impl Copy for Order
impl Eq for Order
impl StructuralPartialEq for Order
Auto Trait Implementations§
impl Freeze for Order
impl RefUnwindSafe for Order
impl Send for Order
impl Sync for Order
impl Unpin for Order
impl UnsafeUnpin for Order
impl UnwindSafe for Order
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> 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
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> ⓘ
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