Struct git_checks::checks::CheckSize [−][src]
pub struct CheckSize { /* fields omitted */ }Checks that files committed to the tree do not exceed a specified size.
Methods
impl CheckSize[src]
impl CheckSizepub fn new(max_size: usize) -> Self[src]
pub fn new(max_size: usize) -> SelfCreate a new check to check for size with the given default size.
The check can be configured using the hooks-max-size attribute to change the maximum size
allowed for specific files.
Trait Implementations
impl Debug for CheckSize[src]
impl Debug for CheckSizefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for CheckSize[src]
impl Clone for CheckSizefn clone(&self) -> CheckSize[src]
fn clone(&self) -> CheckSizeReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Copy for CheckSize[src]
impl Copy for CheckSizeimpl ContentCheck for CheckSize[src]
impl ContentCheck for CheckSizefn name(&self) -> &str[src]
fn name(&self) -> &strThe name of the check.
fn check(&self, ctx: &CheckGitContext, content: &Content) -> Result<CheckResult>[src]
fn check(&self, ctx: &CheckGitContext, content: &Content) -> Result<CheckResult>Run the check.