Struct obsidian_export::WalkOptions
source · pub struct WalkOptions<'a> {
pub ignore_filename: &'a str,
pub ignore_hidden: bool,
pub honor_gitignore: bool,
pub filter_fn: Option<&'static (dyn Fn(&DirEntry) -> bool + Send + Sync + 'static)>,
}
Expand description
WalkOptions specifies how an Obsidian vault directory is scanned for eligible files to export.
Fields§
§ignore_filename: &'a str
The filename for ignore files, following the gitignore syntax.
By default .export-ignore
is used.
Whether to ignore hidden files.
This is enabled by default.
honor_gitignore: bool
Whether to honor git’s ignore rules (.gitignore
files, .git/config/exclude
, etc) if
the target is within a git repository.
This is enabled by default.
filter_fn: Option<&'static (dyn Fn(&DirEntry) -> bool + Send + Sync + 'static)>
An optional custom filter function which is called for each directory entry to determine if it should be included or not.
This is passed to ignore::WalkBuilder::filter_entry
.
Implementations§
source§impl<'a> WalkOptions<'a>
impl<'a> WalkOptions<'a>
sourcepub fn new() -> WalkOptions<'a>
pub fn new() -> WalkOptions<'a>
Create a new set of options using default values.
Trait Implementations§
source§impl<'a> Clone for WalkOptions<'a>
impl<'a> Clone for WalkOptions<'a>
source§fn clone(&self) -> WalkOptions<'a>
fn clone(&self) -> WalkOptions<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a> Debug for WalkOptions<'a>
impl<'a> Debug for WalkOptions<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WalkOptions<'a>
impl<'a> Send for WalkOptions<'a>
impl<'a> Sync for WalkOptions<'a>
impl<'a> Unpin for WalkOptions<'a>
impl<'a> !UnwindSafe for WalkOptions<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more