pub struct CheckCommand<'a> { /* private fields */ }Expand description
check: the summary, then a non-zero exit if any ceiling is breached.
A ceiling given on the command line wins over the same ceiling in the config file, and one set in neither place cannot be breached.
Implementations§
Source§impl<'a> CheckCommand<'a>
impl<'a> CheckCommand<'a>
pub const fn new( config: &'a Config, result: &'a AnalysisResult, reporter: &'a dyn Reporter, thresholds: &'a CheckThresholds, ) -> Self
Sourcepub fn run(&self) -> CliResult<CommandOutcome>
pub fn run(&self) -> CliResult<CommandOutcome>
Report, then measure against every ceiling.
Every breach is reported, not just the first, so one run tells the whole story. The report is produced whether or not a ceiling was breached; the verdict travels alongside it so the caller can print the report and still fail.
§Errors
Returns CliError::Io if the reporter fails. A breached ceiling is
carried in the outcome’s result as CliError::CheckFailed, not
returned from here.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for CheckCommand<'a>
impl<'a> !Send for CheckCommand<'a>
impl<'a> !Sync for CheckCommand<'a>
impl<'a> !UnwindSafe for CheckCommand<'a>
impl<'a> Freeze for CheckCommand<'a>
impl<'a> Unpin for CheckCommand<'a>
impl<'a> UnsafeUnpin for CheckCommand<'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