pub struct FileFilter { /* private fields */ }Expand description
A validated set of file paths used to restrict which files are processed.
All paths are canonicalized for reliable comparison. Created from a newline-separated file list (or stdin) with strict validation: every listed path must exist and reside under the given root directory.
Implementations§
Source§impl FileFilter
impl FileFilter
Sourcepub fn from_paths(
root: &Path,
paths: Vec<PathBuf>,
lenient: bool,
) -> Result<Self>
pub fn from_paths( root: &Path, paths: Vec<PathBuf>, lenient: bool, ) -> Result<Self>
Build a filter from a list of paths, validating each against root.
Every path is canonicalized. Paths that do not exist or fall outside
root produce an error unless lenient is true, in which case
they are silently dropped.
§Errors
Returns an error if a path cannot be canonicalized, does not exist
(when not lenient), or is outside root (when not lenient).
Auto Trait Implementations§
impl Freeze for FileFilter
impl RefUnwindSafe for FileFilter
impl Send for FileFilter
impl Sync for FileFilter
impl Unpin for FileFilter
impl UnsafeUnpin for FileFilter
impl UnwindSafe for FileFilter
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