pub struct FileHeaderRule { /* private fields */ }Trait Implementations§
Source§impl Debug for FileHeaderRule
impl Debug for FileHeaderRule
Source§impl Rule for FileHeaderRule
impl Rule for FileHeaderRule
fn id(&self) -> &str
fn level(&self) -> Level
fn policy_url(&self) -> Option<&str>
Source§fn fixer(&self) -> Option<&dyn Fixer>
fn fixer(&self) -> Option<&dyn Fixer>
Optional automatic-fix strategy. Rules whose violations can be
mechanically corrected (e.g. creating a missing file, removing a
forbidden one, renaming to the correct case) return a
Fixer here; the default implementation reports the rule as
unfixable.fn evaluate(&self, ctx: &Context<'_>) -> Result<Vec<Violation>>
Source§fn wants_git_tracked(&self) -> bool
fn wants_git_tracked(&self) -> bool
Whether this rule needs the git-tracked-paths set on
Context. Default false; rule kinds that support
git_tracked_only override to return true only when
the user actually opted in. The engine collects the set
(via git ls-files) once per run when ANY rule returns
true, so the cost is paid at most once even if many
rules opt in.Source§fn requires_full_index(&self) -> bool
fn requires_full_index(&self) -> bool
Source§fn path_scope(&self) -> Option<&Scope>
fn path_scope(&self) -> Option<&Scope>
Auto Trait Implementations§
impl Freeze for FileHeaderRule
impl RefUnwindSafe for FileHeaderRule
impl Send for FileHeaderRule
impl Sync for FileHeaderRule
impl Unpin for FileHeaderRule
impl UnsafeUnpin for FileHeaderRule
impl UnwindSafe for FileHeaderRule
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more