[−][src]Struct git_checks_core::CheckResult
The results of a check.
Methods
impl CheckResult
[src]
pub fn new() -> Self
[src]
Create a new results structure.
pub fn add_message<S>(&mut self, severity: Severity, message: S) -> &mut Self where
S: Into<String>,
[src]
S: Into<String>,
Add a message to the result.
pub fn add_warning<S: Into<String>>(&mut self, warning: S) -> &mut Self
[src]
Adds a warning message to the results.
pub fn add_alert<S: Into<String>>(
&mut self,
alert: S,
should_block: bool
) -> &mut Self
[src]
&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.
pub fn add_error<S: Into<String>>(&mut self, error: S) -> &mut Self
[src]
Adds a error message to the results.
Also marks the checks as having failed.
pub fn make_temporary(&mut self) -> &mut Self
[src]
Indicates that there are messages which may be temporary.
pub fn whitelist(&mut self) -> &mut Self
[src]
Allows the checks to pass no matter what.
pub fn warnings(&self) -> &Vec<String>
[src]
The warnings from the checks.
pub fn alerts(&self) -> &Vec<String>
[src]
The alerts from the checks.
pub fn errors(&self) -> &Vec<String>
[src]
The errors from the checks.
pub fn temporary(&self) -> bool
[src]
Whether there are temporary messages or not.
pub fn allowed(&self) -> bool
[src]
Whether the checks will allow the commit no matter what.
pub fn pass(&self) -> bool
[src]
Whether the checks passed or failed.
pub fn combine(self, other: Self) -> Self
[src]
Combine two results together.
Trait Implementations
Auto Trait Implementations
impl Send for CheckResult
impl Sync for CheckResult
impl Unpin for CheckResult
impl UnwindSafe for CheckResult
impl RefUnwindSafe for CheckResult
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,