pub struct Message {
pub sender: u64,
pub reply_cap: u64,
pub request_id: u64,
pub tag: u16,
pub payload: u64,
}Expand description
Fixed-size envelope carried in mailboxes and registers (Atomic Hop).
§Why this exists (request-reply / typed protocols)
Receive delivers a single Value — not {sender, Value}. Without an
envelope, a server flow cannot learn who sent a request, and two clients
cannot safely share a request_id space.
§Security
sender: FlowId stamped by the scheduler on bytecodeSend/Ask(invariant S1). Not a capability.reply_cap: CapId minted at the same boundary with SEND-only rights so the recipient can answer without ambient Pid addressing (phase 2). Zero means “no reply grant” (host-injected hops may omit it).
See docs/security.md.
Fields§
§sender: u64Authenticated origin FlowId (0 = trusted host / non-flow).
reply_cap: u64Capability granting SEND back to Self::sender, or 0.
request_id: u64Client correlation token; echoed on replies (Ask / S2).
tag: u16Protocol discriminator (opaque to the VM).
payload: u64Small protocol payload.
Implementations§
Trait Implementations§
impl Copy for Message
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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