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]

pub fn new(
    predicate: Option<&'a (dyn PredicateReflection + 'a)>,
    result: bool
) -> Case<'a>
[src]

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]

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]

Access the sub-cases.

Trait Implementations

impl<'a> Debug for Case<'a>[src]

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Case<'a>[src]

impl<'a> !Send for Case<'a>[src]

impl<'a> !Sync for Case<'a>[src]

impl<'a> Unpin for Case<'a>[src]

impl<'a> !UnwindSafe for Case<'a>[src]

Blanket Implementations

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.