[][src]Struct git_checks::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: ToString
[src]

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

impl Send for CheckResult

impl Sync for CheckResult

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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