struct SortBy {
reverse: bool,
kind: SortByKind,
}
Expand description
The sort criteria, if present.
Fields§
§reverse: bool
Whether to reverse the sort criteria (i.e., descending order).
kind: SortByKind
The actual sorting criteria.
Implementations§
source§impl SortBy
impl SortBy
fn asc(kind: SortByKind) -> SortBy
fn desc(kind: SortByKind) -> SortBy
fn none() -> SortBy
sourcefn check(&self) -> Result<(), Box<dyn Error>>
fn check(&self) -> Result<(), Box<dyn Error>>
Try to check that the sorting criteria selected is actually supported. If it isn’t, then an error is returned.
sourcefn configure_builder_sort(self, builder: &mut WalkBuilder)
fn configure_builder_sort(self, builder: &mut WalkBuilder)
Load sorters only if they are applicable at the walk stage.
In particular, sorts that involve stat
calls are not loaded because
the walk inherently assumes that parent directories are aware of all its
decendent properties, but stat
does not work that way.
Trait Implementations§
source§impl PartialEq<SortBy> for SortBy
impl PartialEq<SortBy> for SortBy
impl Copy for SortBy
impl Eq for SortBy
impl StructuralEq for SortBy
impl StructuralPartialEq for SortBy
Auto Trait Implementations§
impl RefUnwindSafe for SortBy
impl Send for SortBy
impl Sync for SortBy
impl Unpin for SortBy
impl UnwindSafe for SortBy
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