[][src]Struct git_checks_core::CheckResult

pub struct CheckResult { /* fields omitted */ }

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]

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]

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

impl Default for CheckResult[src]

impl Debug for CheckResult[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]