Skip to main content

AnalyzeBuilder

Struct AnalyzeBuilder 

Source
pub struct AnalyzeBuilder { /* private fields */ }

Implementations§

Source§

impl AnalyzeBuilder

Source

pub fn extensions( self, exts: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Only files with one of these extensions (case-insensitive, without the leading dot) are matched. Unset matches any extension, including files with none.

Source

pub fn exclude_globs( self, patterns: impl IntoIterator<Item = impl Into<String>>, ) -> Self

Glob patterns (matched against the path relative to the analyzed root) that prune traversal entirely — an excluded directory is never descended into, not merely omitted from the report.

Source

pub fn min_size(self, bytes: u64) -> Self

Source

pub fn max_size(self, bytes: u64) -> Self

Source

pub fn modified_after(self, t: SystemTime) -> Self

Only files modified at or after t are matched. A file with no readable modified time never matches once this is set.

Source

pub fn modified_before(self, t: SystemTime) -> Self

Only files modified at or before t are matched. A file with no readable modified time never matches once this is set.

Source

pub fn max_depth(self, depth: usize) -> Self

Bounds how far the walk descends: the analyzed root is depth 0, its immediate children depth 1, and so on — passed straight through to walkdir’s own max_depth, which prunes traversal past the bound rather than filtering after the fact.

Off by default. When enabled, walkdir’s own loop detection surfaces a symlink cycle as a per-entry error, handled like any other error via .on_error().

Source

pub fn top_n_largest(self, n: usize) -> Self

How many of the largest matched files to keep in AnalysisReport::largest_files. 0 disables the tracking entirely.

Source

pub fn detect_mime_types(self, enable: bool) -> Self

Off by default — sniffing every matched file’s header via infer is an extra read per file, on top of the metadata walkdir already reads for every entry.

Source

pub fn on_error(self, strategy: AnalysisErrorStrategy) -> Self

Source

pub fn max_reported_errors(self, n: usize) -> Self

Caps AnalysisReport::errors; AnalysisReport::errors_total stays uncapped regardless of this setting.

Source

pub fn start(self) -> Result<AnalysisHandle>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.