pub(crate) struct PathPolicy<'a> {
rules: &'a [PathRuleState],
}Fields§
§rules: &'a [PathRuleState]Implementations§
Source§impl<'a> PathPolicy<'a>
impl<'a> PathPolicy<'a>
Sourcepub(crate) fn new(rules: &'a [PathRuleState]) -> Result<Self, FilesError>
pub(crate) fn new(rules: &'a [PathRuleState]) -> Result<Self, FilesError>
Build a resolver over normalized path rules.
§Errors
Returns an error when a rule’s selector is invalid.
Sourcepub(crate) fn managed(&self, path: &RepositoryPath) -> Result<bool, FilesError>
pub(crate) fn managed(&self, path: &RepositoryPath) -> Result<bool, FilesError>
Whether tracked files at a repository-relative path must be generated or marked as generated.
A path no rule marks is not managed.
§Errors
Returns an error when two rules disagree on managed at the same
priority.
Auto Trait Implementations§
impl<'a> Freeze for PathPolicy<'a>
impl<'a> RefUnwindSafe for PathPolicy<'a>
impl<'a> Send for PathPolicy<'a>
impl<'a> Sync for PathPolicy<'a>
impl<'a> Unpin for PathPolicy<'a>
impl<'a> UnsafeUnpin for PathPolicy<'a>
impl<'a> UnwindSafe for PathPolicy<'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