pub struct HarnessStep<'harness, G, C, O> { /* private fields */ }Expand description
Builder for one harness transaction step.
Implementations§
Source§impl<'harness, G, C, O> HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> HarnessStep<'harness, G, C, O>
Sourcepub fn input<T>(self, input: InputNode<T>, value: T) -> Self
pub fn input<T>(self, input: InputNode<T>, value: T) -> Self
Stages a typed canonical input write for this step.
Sourcepub fn operation(
self,
operation: impl for<'tx> Fn(&mut Transaction<'tx, C, O>) -> GraphResult<()> + 'static,
) -> Self
pub fn operation( self, operation: impl for<'tx> Fn(&mut Transaction<'tx, C, O>) -> GraphResult<()> + 'static, ) -> Self
Stages a custom operation against the transaction.
Sourcepub fn expect_plan(self, command: ResourceCommandTrace) -> Self
pub fn expect_plan(self, command: ResourceCommandTrace) -> Self
Expects one resource command trace in this step.
Sourcepub fn expect_plans(
self,
commands: impl IntoIterator<Item = ResourceCommandTrace>,
) -> Self
pub fn expect_plans( self, commands: impl IntoIterator<Item = ResourceCommandTrace>, ) -> Self
Expects the complete resource command trace for this step.
Sourcepub fn expect_output(self, frame: OutputFrameTrace) -> Self
pub fn expect_output(self, frame: OutputFrameTrace) -> Self
Expects one output frame trace in this step.
Sourcepub fn expect_outputs(
self,
frames: impl IntoIterator<Item = OutputFrameTrace>,
) -> Self
pub fn expect_outputs( self, frames: impl IntoIterator<Item = OutputFrameTrace>, ) -> Self
Expects the complete output frame trace for this step.
Sourcepub fn check(
self,
name: impl Into<String>,
check: impl Fn(&G, &TransactionResult<C, O>) -> bool + 'static,
) -> Self
pub fn check( self, name: impl Into<String>, check: impl Fn(&G, &TransactionResult<C, O>) -> bool + 'static, ) -> Self
Adds a structural invariant check to record in the transaction trace.
Sourcepub fn commit(
self,
) -> Result<&'harness mut TrellisHarness<G, C, O>, ScenarioError>
pub fn commit( self, ) -> Result<&'harness mut TrellisHarness<G, C, O>, ScenarioError>
Commits exactly one transaction for this step.
Auto Trait Implementations§
impl<'harness, G, C, O> !RefUnwindSafe for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> !Send for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> !Sync for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> !UnwindSafe for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> Freeze for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> Unpin for HarnessStep<'harness, G, C, O>
impl<'harness, G, C, O> UnsafeUnpin for HarnessStep<'harness, G, C, O>
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