pub enum CompensationAction {
Rollback {
events: Vec<EventId>,
},
NotifyAgent {
agent_id: Uuid,
message: String,
},
ReleaseResources {
resource_ids: Vec<Uuid>,
},
Custom {
action_type: String,
payload: Value,
},
}Expand description
Action to take for compensating a failed operation.
Variants§
Rollback
Rollback changes
NotifyAgent
Notify an agent about the failure
ReleaseResources
Release held resources
Custom
Custom compensation
Trait Implementations§
Source§impl Clone for CompensationAction
impl Clone for CompensationAction
Source§fn clone(&self) -> CompensationAction
fn clone(&self) -> CompensationAction
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 ComposeSchema for CompensationAction
impl ComposeSchema for CompensationAction
Source§impl Debug for CompensationAction
impl Debug for CompensationAction
Source§impl<'de> Deserialize<'de> for CompensationAction
impl<'de> Deserialize<'de> for CompensationAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CompensationAction
impl PartialEq for CompensationAction
Source§impl Serialize for CompensationAction
impl Serialize for CompensationAction
Source§impl ToSchema for CompensationAction
impl ToSchema for CompensationAction
impl StructuralPartialEq for CompensationAction
Auto Trait Implementations§
impl Freeze for CompensationAction
impl RefUnwindSafe for CompensationAction
impl Send for CompensationAction
impl Sync for CompensationAction
impl Unpin for CompensationAction
impl UnwindSafe for CompensationAction
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