pub struct DeadLetterEngine { /* private fields */ }Expand description
Intelligent dead letter management engine.
Implementations§
Source§impl DeadLetterEngine
impl DeadLetterEngine
pub fn new() -> Self
Sourcepub fn add_item(
&mut self,
execution_id: &str,
workflow_id: &str,
step_id: &str,
failure_class: &str,
error_message: &str,
input_data: Value,
attempt_count: u32,
) -> WorkflowResult<String>
pub fn add_item( &mut self, execution_id: &str, workflow_id: &str, step_id: &str, failure_class: &str, error_message: &str, input_data: Value, attempt_count: u32, ) -> WorkflowResult<String>
Add a failed item to the dead letter queue.
Sourcepub fn list_items(&self) -> Vec<&DeadLetterItem>
pub fn list_items(&self) -> Vec<&DeadLetterItem>
List all dead letter items.
Sourcepub fn summary(&self) -> DeadLetterSummary
pub fn summary(&self) -> DeadLetterSummary
Get a summary grouped by failure class.
Sourcepub fn remove_item(&mut self, item_id: &str) -> WorkflowResult<DeadLetterItem>
pub fn remove_item(&mut self, item_id: &str) -> WorkflowResult<DeadLetterItem>
Remove an item (after successful retry or manual resolution).
Sourcepub fn purge_expired(&mut self) -> usize
pub fn purge_expired(&mut self) -> usize
Purge expired items.
Sourcepub fn retryable_items(&self, failure_class: &str) -> Vec<&DeadLetterItem>
pub fn retryable_items(&self, failure_class: &str) -> Vec<&DeadLetterItem>
Get items that can be auto-retried (for service recovery).
Sourcepub fn set_policy(&mut self, policy: DeadLetterPolicy)
pub fn set_policy(&mut self, policy: DeadLetterPolicy)
Update retention policy.
Sourcepub fn get_policy(&self) -> &DeadLetterPolicy
pub fn get_policy(&self) -> &DeadLetterPolicy
Get current policy.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeadLetterEngine
impl RefUnwindSafe for DeadLetterEngine
impl Send for DeadLetterEngine
impl Sync for DeadLetterEngine
impl Unpin for DeadLetterEngine
impl UnsafeUnpin for DeadLetterEngine
impl UnwindSafe for DeadLetterEngine
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