pub struct IgnoreSet {
pub sources: Vec<PathBuf>,
/* private fields */
}Expand description
Compiled ignore set for a workspace root.
Fields§
§sources: Vec<PathBuf>Paths of ignore files that were loaded (for doctor / bootstrap reports).
Implementations§
Source§impl IgnoreSet
impl IgnoreSet
Sourcepub fn load(workspace: &Path, include_gitignore: bool) -> Result<Self>
pub fn load(workspace: &Path, include_gitignore: bool) -> Result<Self>
Load ignore rules for workspace.
Always includes built-in defaults. Then loads .rustbrainignore if present.
If include_gitignore is true and .gitignore exists, its patterns are appended.
Sourcepub fn is_ignored(&self, rel: &str, is_dir: bool) -> bool
pub fn is_ignored(&self, rel: &str, is_dir: bool) -> bool
Whether a relative path (posix / separators preferred) should be skipped.
is_dir should be true when rel names a directory.
Sourcepub fn skip_dir_name(&self, name: &str) -> bool
pub fn skip_dir_name(&self, name: &str) -> bool
Whether a directory name (single segment) should be skipped during walk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IgnoreSet
impl RefUnwindSafe for IgnoreSet
impl Send for IgnoreSet
impl Sync for IgnoreSet
impl Unpin for IgnoreSet
impl UnsafeUnpin for IgnoreSet
impl UnwindSafe for IgnoreSet
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