Enum cargo_culture_kit::rules::RuleOutcome [−][src]
pub enum RuleOutcome { Success, Failure, Undetermined, }
The result of a Rule.evaluate
call.
Currently represented as a tri-valued flat enum rather than a Result<bool, Error>
to reduce the temptation to use a fancy error management scheme.
This is also to bring attention to 3rd party implementers that a
RuleOutcome::Failure
is not an anomalous situation from the operational
standpoint of a Rule
evaluation, and is distinct from a RuleOutcome:: Undetermined
value.
Variants
Success
The Rule's description
is definitely true for this project
Failure
The Rule's description
definitely is not upheld for this project
Undetermined
Something went wrong in the process of determining whether the Rule was upheld or not for this project. Let's admit that we don't know for sure one way or the other.
Trait Implementations
impl ExitCode for RuleOutcome
[src]
impl ExitCode for RuleOutcome
impl Clone for RuleOutcome
[src]
impl Clone for RuleOutcome
fn clone(&self) -> RuleOutcome
[src]
fn clone(&self) -> RuleOutcome
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for RuleOutcome
[src]
impl Debug for RuleOutcome
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 PartialEq for RuleOutcome
[src]
impl PartialEq for RuleOutcome
fn eq(&self, other: &RuleOutcome) -> bool
[src]
fn eq(&self, other: &RuleOutcome) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl IsSuccess for RuleOutcome
[src]
impl IsSuccess for RuleOutcome
fn is_success(&self) -> bool
[src]
fn is_success(&self) -> bool
Convenience function to answer the simple question "is everything all right?" while providing no answer at all to the useful question "why or why not?" Read more
fn assert_success(&self)
[src]
fn assert_success(&self)
Panic if is_success()
returns false for this instance
impl<T> From<T> for RuleOutcome where
T: Borrow<OutcomesByDescription>,
[src]
impl<T> From<T> for RuleOutcome where
T: Borrow<OutcomesByDescription>,
impl<'a> From<&'a OutcomeStats> for RuleOutcome
[src]
impl<'a> From<&'a OutcomeStats> for RuleOutcome
fn from(stats: &'a OutcomeStats) -> Self
[src]
fn from(stats: &'a OutcomeStats) -> Self
Performs the conversion.
Auto Trait Implementations
impl Send for RuleOutcome
impl Send for RuleOutcome
impl Sync for RuleOutcome
impl Sync for RuleOutcome