Struct yadf::YadfBuilder

source ·
pub struct YadfBuilder<TypedBuilderFields, P: AsRef<Path>> { /* private fields */ }
Expand description

Builder for Yadf instances.

See Yadf::builder() for more info.

Implementations§

source§

impl<__hard_links, __glob, __regex, __max_depth, __maximum_file_size, __minimum_file_size, P: AsRef<Path>> YadfBuilder<((), __minimum_file_size, __maximum_file_size, __max_depth, __regex, __glob, __hard_links), P>

source

pub fn paths( self, paths: impl Into<Rc<[P]>> ) -> YadfBuilder<((Rc<[P]>,), __minimum_file_size, __maximum_file_size, __max_depth, __regex, __glob, __hard_links), P>

Paths that will be checked for duplicate files

source§

impl<__hard_links, __glob, __regex, __max_depth, __maximum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, (), __maximum_file_size, __max_depth, __regex, __glob, __hard_links), P>

source

pub fn minimum_file_size( self, minimum_file_size: impl Into<Option<u64>> ) -> YadfBuilder<(__paths, (Option<u64>,), __maximum_file_size, __max_depth, __regex, __glob, __hard_links), P>

Minimum file size

source§

impl<__hard_links, __glob, __regex, __max_depth, __minimum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, __minimum_file_size, (), __max_depth, __regex, __glob, __hard_links), P>

source

pub fn maximum_file_size( self, maximum_file_size: impl Into<Option<u64>> ) -> YadfBuilder<(__paths, __minimum_file_size, (Option<u64>,), __max_depth, __regex, __glob, __hard_links), P>

Maximum file size

source§

impl<__hard_links, __glob, __regex, __maximum_file_size, __minimum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, (), __regex, __glob, __hard_links), P>

source

pub fn max_depth( self, max_depth: impl Into<Option<usize>> ) -> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, (Option<usize>,), __regex, __glob, __hard_links), P>

Maximum recursion depth

source§

impl<__hard_links, __glob, __max_depth, __maximum_file_size, __minimum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, __max_depth, (), __glob, __hard_links), P>

source

pub fn regex( self, regex: impl Into<Option<Regex>> ) -> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, __max_depth, (Option<Regex>,), __glob, __hard_links), P>

File name must match this regex

source§

impl<__hard_links, __regex, __max_depth, __maximum_file_size, __minimum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, __max_depth, __regex, (), __hard_links), P>

source

pub fn glob( self, glob: impl Into<Option<Glob>> ) -> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, __max_depth, __regex, (Option<Glob>,), __hard_links), P>

File name must match this glob

source§

impl<__glob, __regex, __max_depth, __maximum_file_size, __minimum_file_size, __paths, P: AsRef<Path>> YadfBuilder<(__paths, __minimum_file_size, __maximum_file_size, __max_depth, __regex, __glob, ()), P>

Treat hard links as duplicates

source§

impl<__hard_links: YadfBuilder_Optional<bool>, __glob: YadfBuilder_Optional<Option<Glob>>, __regex: YadfBuilder_Optional<Option<Regex>>, __max_depth: YadfBuilder_Optional<Option<usize>>, __maximum_file_size: YadfBuilder_Optional<Option<u64>>, __minimum_file_size: YadfBuilder_Optional<Option<u64>>, P: AsRef<Path>> YadfBuilder<((Rc<[P]>,), __minimum_file_size, __maximum_file_size, __max_depth, __regex, __glob, __hard_links), P>

source

pub fn build(self) -> Yadf<P>

Finalise the builder and create its Yadf instance

Trait Implementations§

source§

impl<TypedBuilderFields, P: AsRef<Path>> Clone for YadfBuilder<TypedBuilderFields, P>where TypedBuilderFields: Clone,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<TypedBuilderFields, P> RefUnwindSafe for YadfBuilder<TypedBuilderFields, P>where P: RefUnwindSafe, TypedBuilderFields: RefUnwindSafe,

§

impl<TypedBuilderFields, P> Send for YadfBuilder<TypedBuilderFields, P>where P: Send, TypedBuilderFields: Send,

§

impl<TypedBuilderFields, P> Sync for YadfBuilder<TypedBuilderFields, P>where P: Sync, TypedBuilderFields: Sync,

§

impl<TypedBuilderFields, P> Unpin for YadfBuilder<TypedBuilderFields, P>where P: Unpin, TypedBuilderFields: Unpin,

§

impl<TypedBuilderFields, P> UnwindSafe for YadfBuilder<TypedBuilderFields, P>where P: UnwindSafe, TypedBuilderFields: UnwindSafe,

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

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

Initializes a with the given initializer. Read more
§

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

Dereferences the given pointer. Read more
§

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

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

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

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.