Struct git_checks::checks::RestrictedPath [−][src]
pub struct RestrictedPath { /* fields omitted */ }A check which denies commits which modify files underneath certain path.
Methods
impl RestrictedPath[src]
impl RestrictedPathpub fn new<S: ToString>(path: S) -> Self[src]
pub fn new<S: ToString>(path: S) -> SelfCreate a check which rejects modifications to files underneath a of given path.
ⓘImportant traits for &'a mut Rpub fn required(&mut self, required: bool) -> &mut Self[src]
ⓘImportant traits for &'a mut R
pub fn required(&mut self, required: bool) -> &mut SelfWhether commits changing the path are errors or warnings.
Trait Implementations
impl Debug for RestrictedPath[src]
impl Debug for RestrictedPathfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl ContentCheck for RestrictedPath[src]
impl ContentCheck for RestrictedPathfn name(&self) -> &str[src]
fn name(&self) -> &strThe name of the check.
fn check(&self, _: &CheckGitContext, content: &Content) -> Result<CheckResult>[src]
fn check(&self, _: &CheckGitContext, content: &Content) -> Result<CheckResult>Run the check.
Auto Trait Implementations
impl Send for RestrictedPath
impl Send for RestrictedPathimpl Sync for RestrictedPath
impl Sync for RestrictedPath