pub struct ScenarioRecorder { /* private fields */ }Expand description
Scenario recorder
Implementations§
Source§impl ScenarioRecorder
impl ScenarioRecorder
Sourcepub fn with_max_events(self, max: usize) -> Self
pub fn with_max_events(self, max: usize) -> Self
Set maximum events to record
Sourcepub fn start_recording(&self, scenario: ChaosScenario) -> Result<(), String>
pub fn start_recording(&self, scenario: ChaosScenario) -> Result<(), String>
Start recording a scenario
Sourcepub fn stop_recording(&self) -> Result<RecordedScenario, String>
pub fn stop_recording(&self) -> Result<RecordedScenario, String>
Stop recording
Sourcepub fn record_event(&self, event: ChaosEvent)
pub fn record_event(&self, event: ChaosEvent)
Record an event
Sourcepub fn is_recording(&self) -> bool
pub fn is_recording(&self) -> bool
Check if recording is in progress
Sourcepub fn get_current_recording(&self) -> Option<RecordedScenario>
pub fn get_current_recording(&self) -> Option<RecordedScenario>
Get current recording (read-only)
Sourcepub fn get_recordings(&self) -> Vec<RecordedScenario>
pub fn get_recordings(&self) -> Vec<RecordedScenario>
Get all completed recordings
Sourcepub fn get_recording_by_name(&self, name: &str) -> Option<RecordedScenario>
pub fn get_recording_by_name(&self, name: &str) -> Option<RecordedScenario>
Get recording by scenario name
Sourcepub fn clear_recordings(&self)
pub fn clear_recordings(&self)
Clear all recordings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ScenarioRecorder
impl !RefUnwindSafe for ScenarioRecorder
impl Send for ScenarioRecorder
impl Sync for ScenarioRecorder
impl Unpin for ScenarioRecorder
impl !UnwindSafe for ScenarioRecorder
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::Request