pub struct ControlMessage {
pub id: String,
pub execution_id: ExecutionId,
pub action: ControlAction,
pub reason: Option<String>,
pub actor: String,
pub created_at: DateTime<Utc>,
}Expand description
Control message - pause/resume/cancel execution
Fields§
§id: StringUnique message ID
execution_id: ExecutionIdTarget execution
action: ControlActionControl action
reason: Option<String>Reason for the action
actor: StringActor who initiated (user_id, system, agent_id)
created_at: DateTime<Utc>When the message was created
Implementations§
Source§impl ControlMessage
impl ControlMessage
Sourcepub fn new(
execution_id: ExecutionId,
action: ControlAction,
actor: impl Into<String>,
) -> Self
pub fn new( execution_id: ExecutionId, action: ControlAction, actor: impl Into<String>, ) -> Self
Create a new control message
Sourcepub fn with_reason(self, reason: impl Into<String>) -> Self
pub fn with_reason(self, reason: impl Into<String>) -> Self
Add a reason
Trait Implementations§
Source§impl Clone for ControlMessage
impl Clone for ControlMessage
Source§fn clone(&self) -> ControlMessage
fn clone(&self) -> ControlMessage
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 ControlMessage
impl Debug for ControlMessage
Source§impl<'de> Deserialize<'de> for ControlMessage
impl<'de> Deserialize<'de> for ControlMessage
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 ControlMessage
impl RefUnwindSafe for ControlMessage
impl Send for ControlMessage
impl Sync for ControlMessage
impl Unpin for ControlMessage
impl UnsafeUnpin for ControlMessage
impl UnwindSafe for ControlMessage
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