pub struct ControlEvent {
pub event_id: String,
pub execution_id: ExecutionId,
pub step_id: Option<StepId>,
pub timestamp: DateTime<Utc>,
pub actor: ControlActor,
pub action: ControlAction,
pub reason: String,
pub outcome: ControlOutcome,
pub actor_id: Option<String>,
}Expand description
ControlEvent - Governance event for control signals
Records who requested what action, why, and what the outcome was. Used for audit trails and compliance.
Fields§
§event_id: StringUnique event ID
execution_id: ExecutionIdExecution context
step_id: Option<StepId>§timestamp: DateTime<Utc>Control metadata
actor: ControlActor§action: ControlAction§reason: StringReasoning
outcome: ControlOutcomeOutcome
actor_id: Option<String>Actor details (User ID, agent ID, etc.)
Implementations§
Source§impl ControlEvent
impl ControlEvent
Sourcepub fn new(
actor: ControlActor,
action: ControlAction,
execution_id: ExecutionId,
reason: impl Into<String>,
outcome: ControlOutcome,
) -> Self
pub fn new( actor: ControlActor, action: ControlAction, execution_id: ExecutionId, reason: impl Into<String>, outcome: ControlOutcome, ) -> Self
Create a new ControlEvent
Sourcepub fn with_actor_id(self, actor_id: impl Into<String>) -> Self
pub fn with_actor_id(self, actor_id: impl Into<String>) -> Self
Add actor ID
Sourcepub fn pause(
execution_id: ExecutionId,
actor: ControlActor,
reason: impl Into<String>,
) -> Self
pub fn pause( execution_id: ExecutionId, actor: ControlActor, reason: impl Into<String>, ) -> Self
Create a pause control event
Sourcepub fn resume(
execution_id: ExecutionId,
actor: ControlActor,
reason: impl Into<String>,
) -> Self
pub fn resume( execution_id: ExecutionId, actor: ControlActor, reason: impl Into<String>, ) -> Self
Create a resume control event
Sourcepub fn cancel(
execution_id: ExecutionId,
actor: ControlActor,
reason: impl Into<String>,
) -> Self
pub fn cancel( execution_id: ExecutionId, actor: ControlActor, reason: impl Into<String>, ) -> Self
Create a cancel control event
Trait Implementations§
Source§impl Clone for ControlEvent
impl Clone for ControlEvent
Source§fn clone(&self) -> ControlEvent
fn clone(&self) -> ControlEvent
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 ControlEvent
impl Debug for ControlEvent
Source§impl<'de> Deserialize<'de> for ControlEvent
impl<'de> Deserialize<'de> for ControlEvent
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
Auto Trait Implementations§
impl Freeze for ControlEvent
impl RefUnwindSafe for ControlEvent
impl Send for ControlEvent
impl Sync for ControlEvent
impl Unpin for ControlEvent
impl UnsafeUnpin for ControlEvent
impl UnwindSafe for ControlEvent
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