pub struct VisitOptions { /* private fields */ }Expand description
Shared directory traversal policy for collection and paged visiting. Defaults to immediate children only. Collection retains native batching; visiting delivers owned directory pages incrementally through callbacks. Unspecified budgets inherit the client’s resource limits.
Implementations§
Source§impl VisitOptions
impl VisitOptions
Sourcepub const fn unlimited() -> VisitOptions
pub const fn unlimited() -> VisitOptions
Explicitly disable entry, path-byte and depth limits. This can permit unbounded collection or traversal; prefer finite application budgets.
pub const fn new() -> VisitOptions
Sourcepub const fn recursive(self, value: bool) -> VisitOptions
pub const fn recursive(self, value: bool) -> VisitOptions
Descend into directories, without following entry symlinks.
Sourcepub const fn max_entries(self, value: usize) -> VisitOptions
pub const fn max_entries(self, value: usize) -> VisitOptions
Shared entry budget across every input root.
Sourcepub const fn max_path_bytes(self, value: usize) -> VisitOptions
pub const fn max_path_bytes(self, value: usize) -> VisitOptions
Shared path-byte budget. Recursive visiting also charges root paths.
Sourcepub const fn max_depth(self, value: usize) -> VisitOptions
pub const fn max_depth(self, value: usize) -> VisitOptions
Root listing is depth 0; depth 1 also lists immediate subdirectories.
In recursive mode, encountering a directory beyond this limit is an
error unless truncate_at_max_depth(true) is selected. Shallow mode
ignores depth settings and intentionally visits only immediate children.
Finite depths range from 0 through 200; any larger value disables
the depth limit. Entry and path-byte budgets remain in effect.
Sourcepub const fn truncate_at_max_depth(self, value: bool) -> VisitOptions
pub const fn truncate_at_max_depth(self, value: bool) -> VisitOptions
Intentionally stop descending at the depth limit instead of failing.
Sourcepub const fn fields(self, value: AttrMask) -> VisitOptions
pub const fn fields(self, value: AttrMask) -> VisitOptions
Select metadata returned with directory pages, without per-entry stat calls. Defaults to common stat fields. MODE is always requested for traversal; backends may return additional fields or omit unsupported ones.
pub const fn is_recursive(self) -> bool
pub fn metadata_fields(self) -> AttrMask
Sourcepub fn walk_options(self, limits: ResourceLimits) -> WalkOptions
pub fn walk_options(self, limits: ResourceLimits) -> WalkOptions
Resolve recursive traversal limits against the client’s defaults.
Sourcepub fn directory_options(self, limits: ResourceLimits) -> ReadDirOptions
pub fn directory_options(self, limits: ResourceLimits) -> ReadDirOptions
Resolve shallow listing limits against the client’s defaults.
Trait Implementations§
Source§impl Clone for VisitOptions
impl Clone for VisitOptions
Source§fn clone(&self) -> VisitOptions
fn clone(&self) -> VisitOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more