use crate::entities::AgenticSystemExecution;
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AgenticSystemExecutionUpdate {
Updated(AgenticSystemExecution),
Conflict(AgenticSystemExecution),
}
impl AgenticSystemExecutionUpdate {
#[must_use]
pub const fn execution(&self) -> &AgenticSystemExecution {
match self {
Self::Updated(execution) | Self::Conflict(execution) => execution,
}
}
#[must_use]
pub fn into_execution(self) -> AgenticSystemExecution {
match self {
Self::Updated(execution) | Self::Conflict(execution) => execution,
}
}
#[must_use]
pub const fn is_conflict(&self) -> bool {
matches!(self, Self::Conflict(_))
}
}