Skip to main content

PdEnvelope

Struct PdEnvelope 

Source
#[repr(C)]
pub struct PdEnvelope { pub message_id: u128, pub source: u128, pub destination: u128, pub type_tag: u64, pub payload_len: u32, pub flags: u32, pub correlation_id: u64, }
Expand description

Fixed-size C-compatible message header passed to plugin lifecycle hooks.

The layout is identical to palladium_actor::Envelope (80 bytes, repr(C)), so the engine can reinterpret Envelope bytes directly without copying.

All multi-byte fields are little-endian.

Field offsets:

offset  0 – 15 : message_id    (u128)
offset 16 – 31 : source        (u128, actor AddrHash)
offset 32 – 47 : destination   (u128, actor AddrHash)
offset 48 – 55 : type_tag      (u64,  message type discriminant)
offset 56 – 59 : payload_len   (u32)
offset 60 – 63 : flags         (u32,  see FLAG_* constants)
offset 64 – 71 : correlation_id(u64)
offset 72 – 79 : (implicit repr(C) padding — write as zeros)

Total size: 80 bytes (verified by ENVELOPE_SIZE).

Fields§

§message_id: u128

Unique message identifier (engine-assigned).

§source: u128

Sender’s AddrHash (path + generation, packed into a u128).

§destination: u128

Recipient’s AddrHash.

§type_tag: u64

Message type discriminant (FNV-1a of the fully-qualified type name).

§payload_len: u32

Byte length of the accompanying payload buffer.

§flags: u32

Bitfield flags — see FLAG_RESPONSE and FLAG_PRIORITY_MASK.

§correlation_id: u64

Response correlation: matches the message_id of the request.

Trait Implementations§

Source§

impl Clone for PdEnvelope

Source§

fn clone(&self) -> PdEnvelope

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PdEnvelope

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for PdEnvelope

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.