pub struct Scenario {
pub name: String,
pub config: RalphConfig,
pub expected_events: Vec<Event>,
pub expected_iterations: usize,
}Expand description
A test scenario definition.
Fields§
§name: String§config: RalphConfig§expected_events: Vec<Event>§expected_iterations: usizeImplementations§
Source§impl Scenario
impl Scenario
Sourcepub fn new(name: impl Into<String>, config: RalphConfig) -> Self
pub fn new(name: impl Into<String>, config: RalphConfig) -> Self
Creates a new scenario.
Sourcepub fn with_events(self, events: Vec<Event>) -> Self
pub fn with_events(self, events: Vec<Event>) -> Self
Sets expected events.
Sourcepub fn with_iterations(self, count: usize) -> Self
pub fn with_iterations(self, count: usize) -> Self
Sets expected iteration count.
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 UnsafeUnpin 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