pub enum MessageType {
Text {
content: String,
},
Task {
task_id: String,
description: String,
payload: Value,
},
TaskResult {
task_id: String,
success: bool,
result: Value,
},
Heartbeat {
sequence: u64,
},
Command {
command: ActorCommand,
},
Alert {
severity: AlertSeverity,
message: String,
context: Value,
},
SpawnRequest {
agent_type: String,
agent_name: String,
config: Value,
},
SpawnResult {
agent_name: String,
agent_id: String,
success: bool,
error: Option<String>,
},
}Expand description
Discriminated union of all message payloads that actors exchange.
Variants§
Text
Plain text request/response.
Task
Request the recipient to perform a task and reply.
TaskResult
Reply to a previously received Task.
Heartbeat
Heartbeat / keep-alive signal.
Command
Actor lifecycle command.
Fields
§
command: ActorCommandAlert
Alert/error broadcast.
SpawnRequest
Spawn request: ask an orchestrator to create a new agent.
SpawnResult
Confirmation that a spawn completed.
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
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 MessageType
impl Debug for MessageType
Source§impl<'de> Deserialize<'de> for MessageType
impl<'de> Deserialize<'de> for MessageType
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 MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnwindSafe for MessageType
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