Struct contrafact::MappedFact
source · pub struct MappedFact<'a, T> { /* private fields */ }
Expand description
A fact which is mapped from the data to be checked/mutated.
Use mapped
to construct.
Trait Implementations§
source§impl<'a, T: Clone> Clone for MappedFact<'a, T>
impl<'a, T: Clone> Clone for MappedFact<'a, T>
source§fn clone(&self) -> MappedFact<'a, T>
fn clone(&self) -> MappedFact<'a, T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'a, T> Fact<'a, T> for MappedFact<'a, T>where
T: Bounds<'a>,
impl<'a, T> Fact<'a, T> for MappedFact<'a, T>where T: Bounds<'a>,
source§fn mutate(&self, t: T, g: &mut Generator<'a>) -> Mutation<T>
fn mutate(&self, t: T, g: &mut Generator<'a>) -> Mutation<T>
Apply a mutation which moves the obj closer to satisfying the overall
constraint.
source§fn advance(&mut self, _: &T)
fn advance(&mut self, _: &T)
When checking or mutating a sequence of items, this gets called after
each item to modify the state to get ready for the next item.
source§fn satisfy(&mut self, obj: T, g: &mut Generator<'a>) -> ContrafactResult<T>
fn satisfy(&mut self, obj: T, g: &mut Generator<'a>) -> ContrafactResult<T>
Mutate a value such that it satisfies the constraint.
If the constraint cannot be satisfied, panic.
source§fn build_fallible(&mut self, g: &mut Generator<'a>) -> ContrafactResult<T>
fn build_fallible(&mut self, g: &mut Generator<'a>) -> ContrafactResult<T>
Build a new value such that it satisfies the constraint
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for MappedFact<'a, T>
impl<'a, T> !Send for MappedFact<'a, T>
impl<'a, T> !Sync for MappedFact<'a, T>
impl<'a, T> Unpin for MappedFact<'a, T>
impl<'a, T> !UnwindSafe for MappedFact<'a, T>
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