Struct git_checks::impl_prelude::CheckResult
[−]
[src]
pub struct CheckResult { /* fields omitted */ }
The results of a check.
Methods
impl CheckResult
[src]
fn new() -> Self
Create a new results structure.
fn add_message<S>(&mut self, severity: Severity, message: S) -> &mut Self where
S: ToString,
S: ToString,
Add a message to the result.
fn add_warning<S: ToString>(&mut self, warning: S) -> &mut Self
Adds a warning message to the results.
fn add_alert<S: ToString>(&mut self, alert: S, should_block: bool) -> &mut Self
Adds an alert to the results.
These messages should be brought to the attention of those maintaining the deployment of the checks.
fn add_error<S: ToString>(&mut self, error: S) -> &mut Self
Adds a error message to the results.
Also marks the checks as having failed.
fn make_temporary(&mut self) -> &mut Self
Indicates that there are messages which may be temporary.
fn whitelist(&mut self) -> &mut Self
Allows the checks to pass no matter what.
fn warnings(&self) -> &Vec<String>
The warnings from the checks.
fn alerts(&self) -> &Vec<String>
The alerts from the checks.
fn errors(&self) -> &Vec<String>
The errors from the checks.
fn temporary(&self) -> bool
Whether there are temporary messages or not.
fn allowed(&self) -> bool
Whether the checks will allow the commit no matter what.
fn pass(&self) -> bool
Whether the checks passed or failed.
fn combine(self, other: Self) -> Self
Combine two results together.
Trait Implementations
impl Debug for CheckResult
[src]
impl Default for CheckResult
[src]
fn default() -> CheckResult
Returns the "default value" for a type. Read more
impl From<TopicCheckResult> for CheckResult
[src]
fn from(res: TopicCheckResult) -> Self
Performs the conversion.