pub struct Case<'a> { /* private fields */ }
Expand description
A descriptive explanation for why a predicate failed.
Implementations§
Source§impl<'a> Case<'a>
impl<'a> Case<'a>
Sourcepub fn new(
predicate: Option<&'a dyn PredicateReflection>,
result: bool,
) -> Case<'a>
pub fn new( predicate: Option<&'a dyn PredicateReflection>, result: bool, ) -> Case<'a>
Create a new Case
describing the result of a Predicate
.
Sourcepub fn add_product(self, product: Product) -> Case<'a>
pub fn add_product(self, product: Product) -> Case<'a>
Add an additional by product to a Case
.
Sourcepub fn predicate(&self) -> Option<&dyn PredicateReflection>
pub fn predicate(&self) -> Option<&dyn PredicateReflection>
The Predicate
that produced this case.
Sourcepub fn products(&self) -> CaseProducts<'_> ⓘ
pub fn products(&self) -> CaseProducts<'_> ⓘ
Access the by-products from determining this case.
Sourcepub fn children(&self) -> CaseChildren<'_> ⓘ
pub fn children(&self) -> CaseChildren<'_> ⓘ
Access the sub-cases.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Case<'a>
impl<'a> !RefUnwindSafe for Case<'a>
impl<'a> !Send for Case<'a>
impl<'a> !Sync for Case<'a>
impl<'a> Unpin for Case<'a>
impl<'a> !UnwindSafe for Case<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more