pub struct WalkOptions { /* private fields */ }Expand description
Event-walk presentation policy, separate from native directory-page options. Sorting and lifecycle events buffer complete bounded directory listings.
ⓘ
use vfsi_core::api::ListDirOptions;
ListDirOptions::new().with_sort_by_name(true);ⓘ
use vfsi_core::api::{Vfsi, WalkOptions, ListDirOptions};
fn invalid(fs: &impl Vfsi) {
fs.vlistdirs(&["/"], WalkOptions::new(ListDirOptions::new()), |_, _| {
Ok(std::ops::ControlFlow::Continue(()))
}).unwrap();
}Implementations§
Source§impl WalkOptions
impl WalkOptions
pub const fn new(listing: ListDirOptions) -> WalkOptions
Sourcepub const fn with_listing_options(self, listing: ListDirOptions) -> WalkOptions
pub const fn with_listing_options(self, listing: ListDirOptions) -> WalkOptions
Replace shared listing policy without changing presentation settings.
pub const fn listing_options(self) -> ListDirOptions
Sourcepub const fn with_enter_leave(self, value: bool) -> WalkOptions
pub const fn with_enter_leave(self, value: bool) -> WalkOptions
Include directory Enter/Leave events, including the root.
Sourcepub const fn with_sort_by_name(self, value: bool) -> WalkOptions
pub const fn with_sort_by_name(self, value: bool) -> WalkOptions
Buffer and sort each directory by filename before emitting its events.
pub const fn enter_leave(self) -> bool
pub const fn sort_by_name(self) -> bool
Trait Implementations§
Source§impl Clone for WalkOptions
impl Clone for WalkOptions
Source§fn clone(&self) -> WalkOptions
fn clone(&self) -> WalkOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WalkOptions
Source§impl Debug for WalkOptions
impl Debug for WalkOptions
Source§impl Default for WalkOptions
impl Default for WalkOptions
Source§fn default() -> WalkOptions
fn default() -> WalkOptions
Returns the “default value” for a type. Read more
impl Eq for WalkOptions
Source§impl From<ListDirOptions> for WalkOptions
impl From<ListDirOptions> for WalkOptions
Source§fn from(listing: ListDirOptions) -> WalkOptions
fn from(listing: ListDirOptions) -> WalkOptions
Converts to this type from the input type.
Source§impl PartialEq for WalkOptions
impl PartialEq for WalkOptions
impl StructuralPartialEq for WalkOptions
Auto Trait Implementations§
impl Freeze for WalkOptions
impl RefUnwindSafe for WalkOptions
impl Send for WalkOptions
impl Sync for WalkOptions
impl Unpin for WalkOptions
impl UnsafeUnpin for WalkOptions
impl UnwindSafe for WalkOptions
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