pub struct DevCassette { /* private fields */ }Expand description
A development cassette backed by the standard StreamCassette format.
Implementations§
Source§impl DevCassette
impl DevCassette
Sourcepub fn from_events(stream_id: Symbol, events: Vec<DevEvent>) -> Result<Self>
pub fn from_events(stream_id: Symbol, events: Vec<DevEvent>) -> Result<Self>
Records a development session into a stream cassette.
Sourcepub fn from_stream_cassette(cassette: StreamCassette) -> Result<Self>
pub fn from_stream_cassette(cassette: StreamCassette) -> Result<Self>
Wraps an existing stream cassette as a development cassette.
Sourcepub fn cassette(&self) -> &StreamCassette
pub fn cassette(&self) -> &StreamCassette
Returns the underlying stream cassette.
Sourcepub fn content_hash(&self) -> &str
pub fn content_hash(&self) -> &str
Returns the deterministic cassette content hash.
Sourcepub fn redacted(&self) -> Result<Self>
pub fn redacted(&self) -> Result<Self>
Returns a copy with host paths, host names, and private payloads redacted.
Sourcepub fn validate_golden_fixture(
&self,
path: &str,
) -> Result<StreamGoldenFixtureReport>
pub fn validate_golden_fixture( &self, path: &str, ) -> Result<StreamGoldenFixtureReport>
Delegates golden fixture validation to the underlying stream cassette.
Sourcepub fn replay_content_hash(&self) -> Result<String>
pub fn replay_content_hash(&self) -> Result<String>
Replays the cassette and recomputes the content hash.
Sourcepub fn replay_with_fault(
&self,
plan: &StreamFaultPlan,
) -> Result<DevFaultReport>
pub fn replay_with_fault( &self, plan: &StreamFaultPlan, ) -> Result<DevFaultReport>
Replays the cassette with a stream fault plan applied.
Trait Implementations§
Source§impl Clone for DevCassette
impl Clone for DevCassette
Source§fn clone(&self) -> DevCassette
fn clone(&self) -> DevCassette
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 DevCassette
impl Debug for DevCassette
impl Eq for DevCassette
Source§impl PartialEq for DevCassette
impl PartialEq for DevCassette
Source§fn eq(&self, other: &DevCassette) -> bool
fn eq(&self, other: &DevCassette) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DevCassette
Auto Trait Implementations§
impl Freeze for DevCassette
impl RefUnwindSafe for DevCassette
impl Send for DevCassette
impl Sync for DevCassette
impl Unpin for DevCassette
impl UnsafeUnpin for DevCassette
impl UnwindSafe for DevCassette
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