pub struct IpcMessage {
pub topic: String,
pub payload: IpcPayload,
pub signature: Option<Vec<u8>>,
pub source_id: Uuid,
pub timestamp: DateTime<Utc>,
}Expand description
A cross-boundary message sent over the event bus between WASM guests and the host.
Fields§
§topic: StringTopic pattern or exact match (e.g., astrid.cli.input).
payload: IpcPayloadStandardized payload structure.
signature: Option<Vec<u8>>Optional cryptographic signature for stateless verification across a distributed swarm.
source_id: UuidIdentifier of the sender plugin or agent.
timestamp: DateTime<Utc>Timestamp when the message was dispatched.
Implementations§
Source§impl IpcMessage
impl IpcMessage
Sourcepub fn new(
topic: impl Into<String>,
payload: IpcPayload,
source_id: Uuid,
) -> Self
pub fn new( topic: impl Into<String>, payload: IpcPayload, source_id: Uuid, ) -> Self
Create a new IPC message.
Sourcepub fn with_signature(self, signature: Vec<u8>) -> Self
pub fn with_signature(self, signature: Vec<u8>) -> Self
Attach a signature for swarm verification.
Trait Implementations§
Source§impl Clone for IpcMessage
impl Clone for IpcMessage
Source§fn clone(&self) -> IpcMessage
fn clone(&self) -> IpcMessage
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 IpcMessage
impl Debug for IpcMessage
Source§impl<'de> Deserialize<'de> for IpcMessage
impl<'de> Deserialize<'de> for IpcMessage
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 IpcMessage
impl PartialEq for IpcMessage
Source§impl Serialize for IpcMessage
impl Serialize for IpcMessage
impl StructuralPartialEq for IpcMessage
Auto Trait Implementations§
impl Freeze for IpcMessage
impl RefUnwindSafe for IpcMessage
impl Send for IpcMessage
impl Sync for IpcMessage
impl Unpin for IpcMessage
impl UnsafeUnpin for IpcMessage
impl UnwindSafe for IpcMessage
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