Skip to main content

ScannerConfig

Struct ScannerConfig 

Source
pub struct ScannerConfig {
Show 25 fields pub max_depth: usize, pub follow_symlinks: bool, pub respect_gitignore: bool, pub show_hidden: bool, pub show_ignored: bool, pub find_pattern: Option<Regex>, pub file_type_filter: Option<String>, pub entry_type_filter: Option<String>, pub min_size: Option<u64>, pub max_size: Option<u64>, pub newer_than: Option<SystemTime>, pub older_than: Option<SystemTime>, pub use_default_ignores: bool, pub search_keyword: Option<String>, pub show_filesystems: bool, pub sort_field: Option<String>, pub top_n: Option<usize>, pub include_line_content: bool, pub compute_interest: bool, pub security_scan: bool, pub min_interest: f32, pub track_traversal: bool, pub changes_only: bool, pub compare_state: Option<PathBuf>, pub smart_mode: bool,
}
Expand description

§ScannerConfig: The Rider for our Rock Star Scanner

This is the list of demands for our scanner. “Don’t show me hidden files,” “I only want to see files bigger than a tour bus,” “Ignore the messy backstage area (.gitignore).” We build this from the user’s command-line arguments to make sure the scanner puts on the exact show the user wants to see.

Fields§

§max_depth: usize

Maximum depth to traverse into subdirectories.

§follow_symlinks: bool

Should symbolic links be followed? (Currently always false).

§respect_gitignore: bool

Should .gitignore files be respected?

§show_hidden: bool

Should hidden files (starting with .) be shown?

§show_ignored: bool

Should ignored files/directories be shown (usually in brackets)?

§find_pattern: Option<Regex>

An optional regex pattern to filter files/directories by name.

§file_type_filter: Option<String>

An optional file extension to filter by (e.g., “rs”).

§entry_type_filter: Option<String>

Optional entry type filter (“f” for files, “d” for directories).

§min_size: Option<u64>

Optional minimum file size filter.

§max_size: Option<u64>

Optional maximum file size filter.

§newer_than: Option<SystemTime>

Optional filter for files newer than a specific date.

§older_than: Option<SystemTime>

Optional filter for files older than a specific date.

§use_default_ignores: bool

Should the scanner use its built-in list of default ignore patterns (like node_modules, __pycache__, target/)?

§search_keyword: Option<String>

An optional keyword to search for within file contents.

§show_filesystems: bool

Should filesystem type indicators be shown?

§sort_field: Option<String>

Sort field for results (name, size, date, type)

§top_n: Option<usize>

Limit results to top N entries (useful with sort)

§include_line_content: bool

Include actual line content in search results (for AI/MCP use)

§compute_interest: bool

Compute interest scores for each node (default: true when smart mode is enabled)

§security_scan: bool

Perform security scanning during traversal (default: true)

§min_interest: f32

Minimum interest score to include in results (0.0-1.0, default: 0.0)

§track_traversal: bool

Track how we reached each location (symlink, mount, etc.)

§changes_only: bool

Only show changes since last scan

§compare_state: Option<PathBuf>

Path to previous state file for comparison (or auto-detect from ~/.st/scan_states/)

§smart_mode: bool

Enable smart mode - groups by interest, shows changes, minimal output

Trait Implementations§

Source§

impl Clone for ScannerConfig

Source§

fn clone(&self) -> ScannerConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for ScannerConfig

Source§

fn default() -> ScannerConfig

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,