Struct git_checks::CheckResult [−][src]
pub struct CheckResult { /* fields omitted */ }
The results of a check.
Methods
impl CheckResult
[src]
impl CheckResult
pub fn new() -> Self
[src]
pub fn new() -> Self
Create a new results structure.
ⓘImportant traits for &'a mut Rpub fn add_message<S>(&mut self, severity: Severity, message: S) -> &mut Self where
S: ToString,
[src]
pub fn add_message<S>(&mut self, severity: Severity, message: S) -> &mut Self where
S: ToString,
Add a message to the result.
ⓘImportant traits for &'a mut Rpub fn add_warning<S: ToString>(&mut self, warning: S) -> &mut Self
[src]
pub fn add_warning<S: ToString>(&mut self, warning: S) -> &mut Self
Adds a warning message to the results.
ⓘImportant traits for &'a mut Rpub fn add_alert<S: ToString>(
&mut self,
alert: S,
should_block: bool
) -> &mut Self
[src]
pub 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.
ⓘImportant traits for &'a mut Rpub fn add_error<S: ToString>(&mut self, error: S) -> &mut Self
[src]
pub 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.
ⓘImportant traits for &'a mut Rpub fn make_temporary(&mut self) -> &mut Self
[src]
pub fn make_temporary(&mut self) -> &mut Self
Indicates that there are messages which may be temporary.
ⓘImportant traits for &'a mut Rpub fn whitelist(&mut self) -> &mut Self
[src]
pub fn whitelist(&mut self) -> &mut Self
Allows the checks to pass no matter what.
pub fn warnings(&self) -> &Vec<String>
[src]
pub fn warnings(&self) -> &Vec<String>
The warnings from the checks.
pub fn alerts(&self) -> &Vec<String>
[src]
pub fn alerts(&self) -> &Vec<String>
The alerts from the checks.
pub fn errors(&self) -> &Vec<String>
[src]
pub fn errors(&self) -> &Vec<String>
The errors from the checks.
pub fn temporary(&self) -> bool
[src]
pub fn temporary(&self) -> bool
Whether there are temporary messages or not.
pub fn allowed(&self) -> bool
[src]
pub fn allowed(&self) -> bool
Whether the checks will allow the commit no matter what.
pub fn pass(&self) -> bool
[src]
pub fn pass(&self) -> bool
Whether the checks passed or failed.
pub fn combine(self, other: Self) -> Self
[src]
pub fn combine(self, other: Self) -> Self
Combine two results together.
Trait Implementations
impl Debug for CheckResult
[src]
impl Debug for CheckResult
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for CheckResult
[src]
impl Default for CheckResult
fn default() -> CheckResult
[src]
fn default() -> CheckResult
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for CheckResult
impl Send for CheckResult
impl Sync for CheckResult
impl Sync for CheckResult