[][src]Struct dia_files::path_filter::IgnoredDirNames

pub struct IgnoredDirNames<'a> { /* fields omitted */ }

A filter that ignores directories by names you provide

Examples

use std::path::PathBuf;
use dia_files::path_filter::IgnoredDirNames;

const IGNORED_DIR_NAMES: &[&str] = &[
    ".git", ".hg", ".svn", ".gradle", "target", "build", "release", "debug",
];

let dir = PathBuf::from(file!()).parent().unwrap().to_path_buf();
let filter = IgnoredDirNames::new(IGNORED_DIR_NAMES);
assert!(dia_files::find_files(dir, false, filter).unwrap().count() > 0);

Methods

impl<'a> IgnoredDirNames<'a>[src]

pub fn new(dir_names: &'a [&'a str]) -> Self[src]

Trait Implementations

impl<'_> Filter for IgnoredDirNames<'_>[src]

impl<'a> Clone for IgnoredDirNames<'a>[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'a> Debug for IgnoredDirNames<'a>[src]

Auto Trait Implementations

impl<'a> Send for IgnoredDirNames<'a>

impl<'a> Sync for IgnoredDirNames<'a>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]