Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 30 fields pub default_depth: u32, pub default_method: u8, pub case_insensitive: bool, pub include_dirs: bool, pub binary_check_bytes: usize, pub max_line_length: usize, pub threads: usize, pub hash_algorithm: String, pub hash_buffer_size: usize, pub dup_min_size: u64, pub dup_max_size: u64, pub verbose: bool, pub show_size: bool, pub show_modified: bool, pub max_results: usize, pub color_index: String, pub color_path: String, pub color_line_num: String, pub color_line_text: String, pub color_header: String, pub color_count: String, pub color_error: String, pub color_warn: String, pub color_info: String, pub color_pattern: String, pub color_dup_group: String, pub color_dup_path: String, pub color_dup_size: String, pub exclude_dirs: String, pub default_include: String,
}
Expand description

Complete fsearch configuration.

All fields are optional at the TOML level — missing keys fall back to the values in Config::default.

Fields§

§default_depth: u32

Default max depth for -d flag.

§default_method: u8

1 = walkdir+rayon, 2 = recursive.

§case_insensitive: bool

Match case-insensitively by default.

§include_dirs: bool

Include directory entries in filename-search results.

§binary_check_bytes: usize

Bytes to probe when checking for binary content.

§max_line_length: usize

Lines longer than this are skipped in content search.

§threads: usize

Rayon thread count (0 = all logical CPUs).

§hash_algorithm: String

Hashing algorithm: "md5" or "sha256".

§hash_buffer_size: usize

Buffer size (bytes) used when streaming files for hashing.

§dup_min_size: u64

Minimum file size (bytes) to consider for duplicate detection (0 = all).

§dup_max_size: u64

Maximum file size (bytes) to consider (0 = unlimited).

§verbose: bool

Print verbose status to stderr.

§show_size: bool

Show file sizes next to results.

§show_modified: bool

Show last-modified timestamps next to results.

§max_results: usize

Maximum results to return (0 = unlimited).

§color_index: String§color_path: String§color_line_num: String§color_line_text: String§color_header: String§color_count: String§color_error: String§color_warn: String§color_info: String§color_pattern: String§color_dup_group: String§color_dup_path: String§color_dup_size: String§exclude_dirs: String

Comma-separated directory names always skipped during traversal.

§default_include: String

Comma-separated glob patterns included by default (empty = all).

Implementations§

Source§

impl Config

Source

pub fn load() -> Self

Load config: local override → user config → defaults.

Source

pub fn load_from_path(path: PathBuf) -> FsearchResult<Self>

Load from an explicit path — useful for testing and library consumers.

Source

pub fn write_default() -> FsearchResult<PathBuf>

Write an annotated default config file and return its path.

Source

pub fn excluded_dirs(&self) -> Vec<String>

Parsed list of directory-name globs to skip.

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Config
where Config: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Config

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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