pub struct SerializedScenario { /* private fields */ }Expand description
A versioned structural trace file for a recorded scenario.
Implementations§
Source§impl SerializedScenario
impl SerializedScenario
Sourcepub fn from_scenario(scenario: &Scenario) -> Self
pub fn from_scenario(scenario: &Scenario) -> Self
Captures a scenario as a versioned structural trace file.
Sourcepub fn format_version(&self) -> u32
pub fn format_version(&self) -> u32
Returns the serialized format version.
Sourcepub fn steps(&self) -> &[SerializedScenarioStep]
pub fn steps(&self) -> &[SerializedScenarioStep]
Returns trace steps in commit order.
Sourcepub fn into_scenario(self) -> Result<Scenario, ScenarioError>
pub fn into_scenario(self) -> Result<Scenario, ScenarioError>
Rebuilds a scenario recorder from this versioned trace file.
Sourcepub fn assert_matches_scenario(
&self,
actual: &Scenario,
) -> Result<(), ScenarioError>
pub fn assert_matches_scenario( &self, actual: &Scenario, ) -> Result<(), ScenarioError>
Checks this trace file against a freshly replayed scenario.
Trait Implementations§
Source§impl Clone for SerializedScenario
impl Clone for SerializedScenario
Source§fn clone(&self) -> SerializedScenario
fn clone(&self) -> SerializedScenario
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SerializedScenario
impl Debug for SerializedScenario
impl Eq for SerializedScenario
Source§impl PartialEq for SerializedScenario
impl PartialEq for SerializedScenario
Source§fn eq(&self, other: &SerializedScenario) -> bool
fn eq(&self, other: &SerializedScenario) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SerializedScenario
Auto Trait Implementations§
impl Freeze for SerializedScenario
impl RefUnwindSafe for SerializedScenario
impl Send for SerializedScenario
impl Sync for SerializedScenario
impl Unpin for SerializedScenario
impl UnsafeUnpin for SerializedScenario
impl UnwindSafe for SerializedScenario
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