pub struct OperationRecord {
pub name: String,
pub operation_type: String,
}Expand description
A recorded durable operation for sequence verification (FR39).
Each time the handler starts a new operation (step, wait, callback, etc.),
an OperationRecord is captured with the operation name and type.
§Examples
use durable_lambda_testing::prelude::*;
let (mut ctx, calls, ops) = MockDurableContext::new()
.build()
.await;
let _: Result<i32, String> = ctx.step("validate", || async { Ok(42) }).await.unwrap();
let recorded = ops.lock().await;
assert_eq!(recorded[0].name, "validate");
assert_eq!(recorded[0].operation_type, "step");Fields§
§name: StringThe user-provided operation name (e.g., “validate”, “cooldown”).
operation_type: StringThe operation type as a lowercase string (e.g., “step”, “wait”, “callback”).
Implementations§
Source§impl OperationRecord
impl OperationRecord
Sourcepub fn to_type_name(&self) -> String
pub fn to_type_name(&self) -> String
Format as "type:name" for use with assertion helpers.
§Examples
use durable_lambda_testing::mock_backend::OperationRecord;
let record = OperationRecord {
name: "validate".to_string(),
operation_type: "step".to_string(),
};
assert_eq!(record.to_type_name(), "step:validate");Trait Implementations§
Source§impl Clone for OperationRecord
impl Clone for OperationRecord
Source§fn clone(&self) -> OperationRecord
fn clone(&self) -> OperationRecord
Returns a duplicate of the value. Read more
1.0.0 · 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 OperationRecord
impl Debug for OperationRecord
Source§impl Display for OperationRecord
impl Display for OperationRecord
Source§impl PartialEq for OperationRecord
impl PartialEq for OperationRecord
impl Eq for OperationRecord
impl StructuralPartialEq for OperationRecord
Auto Trait Implementations§
impl Freeze for OperationRecord
impl RefUnwindSafe for OperationRecord
impl Send for OperationRecord
impl Sync for OperationRecord
impl Unpin for OperationRecord
impl UnsafeUnpin for OperationRecord
impl UnwindSafe for OperationRecord
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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 moreCreates a shared type from an unshared type.