pub struct Scenario { /* private fields */ }Expand description
Scenario builder for multi-step test orchestration
Implementations§
Source§impl Scenario
impl Scenario
Sourcepub fn with_policy(self, policy: Policy) -> Self
pub fn with_policy(self, policy: Policy) -> Self
Set the policy for this scenario
Sourcepub fn deterministic(self, seed: Option<u64>) -> Self
pub fn deterministic(self, seed: Option<u64>) -> Self
Enable deterministic execution
Sourcepub fn timeout_ms(self, timeout: u64) -> Self
pub fn timeout_ms(self, timeout: u64) -> Self
Set timeout for the scenario
Sourcepub fn concurrent(self) -> Self
pub fn concurrent(self) -> Self
Enable concurrent execution
Sourcepub async fn run_async(self) -> Result<RunResult>
pub async fn run_async(self) -> Result<RunResult>
Run the scenario asynchronously with testcontainers backend
Core Team Compliance:
- ✅ Async function for I/O operations
- ✅ Proper error handling with CleanroomError
- ✅ No unwrap() or expect() calls
Sourcepub fn run_with_backend(
self,
backend: TestcontainerBackend,
) -> Result<RunResult>
pub fn run_with_backend( self, backend: TestcontainerBackend, ) -> Result<RunResult>
Run the scenario with a specific backend
Sourcepub async fn run_with_backend_async(
self,
backend: TestcontainerBackend,
) -> Result<RunResult>
pub async fn run_with_backend_async( self, backend: TestcontainerBackend, ) -> Result<RunResult>
Run the scenario asynchronously with a specific backend
Core Team Compliance:
- ✅ Async function for I/O operations
- ✅ Proper error handling with CleanroomError
- ✅ No unwrap() or expect() calls
- ✅ Uses spawn_blocking to avoid nested runtime issues
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scenario
impl RefUnwindSafe for Scenario
impl Send for Scenario
impl Sync for Scenario
impl Unpin for Scenario
impl UnwindSafe for Scenario
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request