pub struct ScenarioManager { /* private fields */ }Expand description
Scenario manager for switching test scenarios
Implementations§
Source§impl ScenarioManager
impl ScenarioManager
Sourcepub async fn switch_scenario(&self, scenario_name: &str) -> Result<()>
pub async fn switch_scenario(&self, scenario_name: &str) -> Result<()>
Switch to a different scenario/workspace
§Arguments
scenario_name- Name of the scenario to switch to
Sourcepub async fn load_workspace<P: AsRef<Path>>(
&self,
workspace_file: P,
) -> Result<()>
pub async fn load_workspace<P: AsRef<Path>>( &self, workspace_file: P, ) -> Result<()>
Load a workspace configuration from a file
§Arguments
workspace_file- Path to the workspace configuration file (JSON or YAML)
Sourcepub async fn update_mock(&self, endpoint: &str, config: Value) -> Result<()>
pub async fn update_mock(&self, endpoint: &str, config: Value) -> Result<()>
Update mock configuration dynamically
§Arguments
endpoint- The endpoint path to configure (e.g., “/users”)config- The mock configuration as JSON
Sourcepub async fn list_fixtures(&self) -> Result<Vec<String>>
pub async fn list_fixtures(&self) -> Result<Vec<String>>
List available fixtures
Auto Trait Implementations§
impl Freeze for ScenarioManager
impl !RefUnwindSafe for ScenarioManager
impl Send for ScenarioManager
impl Sync for ScenarioManager
impl Unpin for ScenarioManager
impl !UnwindSafe for ScenarioManager
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