pub struct IgnoreSet { /* private fields */ }Expand description
bundle 全局的忽略判定器。
Implementations§
Source§impl IgnoreSet
impl IgnoreSet
Sourcepub fn push_layer(&mut self, scope: &str, text: &str)
pub fn push_layer(&mut self, scope: &str, text: &str)
追加一层 bundle 内的 ignore(scope = 所在分支目录的 bundle 相对路径,
bundle 根传 ""),text 为文件内容。
Sourcepub fn push_outer(&mut self, prefix: &str, text: &str)
pub fn push_outer(&mut self, prefix: &str, text: &str)
追加一层 bundle 外的 ignore(如外层 git 仓库的 .gitignore)。
prefix = bundle 根相对该文件所在目录的路径(ignore 目录为 bundle 祖先时
即中间路径;空串表示就是 bundle 根)。
Sourcepub fn push_system_layer(&mut self)
pub fn push_system_layer(&mut self)
追加系统级忽略层(规范 4.7):._meta / ._schema/ / ._cache/ 与整个
._ 保留命名空间、.lock,以及 OS / VCS 元数据。该层必须最后入栈
(恒为最内层):不受 policies.gitignore 开关影响,用户 .gitignore /
policies.ignore 的 ! 取反不能恢复这些条目。
Sourcepub fn is_ignored(&self, rel: &str, is_dir: bool) -> bool
pub fn is_ignored(&self, rel: &str, is_dir: bool) -> bool
判定 bundle 内相对路径 rel(/ 分隔)是否被忽略。
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