[][src]Struct git_checks::CheckResult

pub struct CheckResult { /* fields omitted */ }

The results of a check.


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: ToString

Add a message to the result.

pub fn add_warning<S: ToString>(&mut self, warning: S) -> &mut Self[src]

Adds a warning message to the results.

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.

pub fn add_error<S: ToString>(&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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

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