pub struct TestTransaction<'a> {
pub inner: &'a mut AdminTransaction,
pub baseline: usize,
pub events: &'a mut Vec<CapturedEvent>,
pub invocations: &'a mut Vec<CapturedInvocation>,
pub event_seq: &'a mut u64,
pub handler_seq: &'a mut u64,
pub savepoint: Option<Savepoint>,
pub session_type: SessionOp,
pub session_default_deny: bool,
}Fields§
§inner: &'a mut AdminTransaction§baseline: usize§events: &'a mut Vec<CapturedEvent>§invocations: &'a mut Vec<CapturedInvocation>§event_seq: &'a mut u64§handler_seq: &'a mut u64§savepoint: Option<Savepoint>§session_type: SessionOp§session_default_deny: boolImplementations§
Source§impl<'a> TestTransaction<'a>
impl<'a> TestTransaction<'a>
pub fn new( inner: &'a mut AdminTransaction, events: &'a mut Vec<CapturedEvent>, invocations: &'a mut Vec<CapturedInvocation>, event_seq: &'a mut u64, handler_seq: &'a mut u64, session_type: SessionOp, session_default_deny: bool, ) -> Self
Sourcepub fn reborrow(&mut self) -> TestTransaction<'_>
pub fn reborrow(&mut self) -> TestTransaction<'_>
Re-borrow this test transaction with a shorter lifetime,
producing a TestTransaction suitable for embedding in a
Transaction::Test variant without consuming self.
Sourcepub fn accumulator_entries_from(&self) -> &[(ShapeId, Diff)]
pub fn accumulator_entries_from(&self) -> &[(ShapeId, Diff)]
Read accumulator entries since the baseline. Used by testing helpers to inspect mutations within the current test.
Sourcepub fn capture_testing_pre_commit(&mut self) -> Result<()>
pub fn capture_testing_pre_commit(&mut self) -> Result<()>
Execute test-only pre-commit style processing without committing.
If a test_pre_commit hook is registered on the interceptors, it is
called first to ensure uncommitted flows are registered in the shared
flow engine. Then the pre-commit interceptor chain runs (which
includes transactional flow processing) over accumulator entries from
the baseline onwards.
Used by testing helpers that need commit-time flow work materialized while still staying inside the test savepoint.
Auto Trait Implementations§
impl<'a> Freeze for TestTransaction<'a>
impl<'a> !RefUnwindSafe for TestTransaction<'a>
impl<'a> Send for TestTransaction<'a>
impl<'a> Sync for TestTransaction<'a>
impl<'a> Unpin for TestTransaction<'a>
impl<'a> UnsafeUnpin for TestTransaction<'a>
impl<'a> !UnwindSafe for TestTransaction<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more