Struct predicates::reflection::Case [−][src]
pub struct Case<'a> { /* fields omitted */ }
A descriptive explanation for why a predicate failed.
Implementations
impl<'a> Case<'a>
[src]
impl<'a> Case<'a>
[src]pub fn new(
predicate: Option<&'a (dyn PredicateReflection + 'a)>,
result: bool
) -> Case<'a>
[src]
predicate: Option<&'a (dyn PredicateReflection + 'a)>,
result: bool
) -> Case<'a>
Create a new Case
describing the result of a Predicate
.
pub fn add_product(self, product: Product) -> Case<'a>
[src]
Add an additional by product to a Case
.
pub fn add_child(self, child: Case<'a>) -> Case<'a>
[src]
Add an additional by product to a Case
.
pub fn predicate(&self) -> Option<&dyn PredicateReflection>
[src]
The Predicate
that produced this case.
pub fn result(&self) -> bool
[src]
The result of this case.
pub fn products(&self) -> CaseProducts<'_>ⓘNotable traits for CaseProducts<'a>
impl<'a> Iterator for CaseProducts<'a> type Item = &'a Product;
[src]
Notable traits for CaseProducts<'a>
impl<'a> Iterator for CaseProducts<'a> type Item = &'a Product;
Access the by-products from determining this case.
pub fn children(&self) -> CaseChildren<'_>ⓘNotable traits for CaseChildren<'a>
impl<'a> Iterator for CaseChildren<'a> type Item = &'a Case<'a>;
[src]
Notable traits for CaseChildren<'a>
impl<'a> Iterator for CaseChildren<'a> type Item = &'a Case<'a>;
Access the sub-cases.
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Case<'a>
impl<'a> !RefUnwindSafe for Case<'a>
impl<'a> !UnwindSafe for Case<'a>
impl<'a> !UnwindSafe for Case<'a>