#[repr(C, align(64))]pub struct MsgDescHot {
pub msg_id: u64,
pub channel_id: u32,
pub method_id: u32,
pub payload_slot: u32,
pub payload_generation: u32,
pub payload_offset: u32,
pub payload_len: u32,
pub flags: FrameFlags,
pub credit_grant: u32,
pub deadline_ns: u64,
pub inline_payload: [u8; 16],
}Expand description
Hot-path message descriptor (64 bytes, one cache line).
This is the primary descriptor used for frame dispatch. Fits in a single cache line for performance.
Fields§
§msg_id: u64Unique message ID per session, monotonic.
channel_id: u32Logical stream (0 = control channel).
method_id: u32For RPC dispatch, or control verb.
payload_slot: u32Slot index (u32::MAX = inline).
payload_generation: u32Generation counter for ABA safety.
payload_offset: u32Offset within slot.
payload_len: u32Actual payload length.
flags: FrameFlagsFrame flags (EOS, CANCEL, ERROR, etc.).
credit_grant: u32Credits being granted to peer.
deadline_ns: u64Deadline in nanoseconds (monotonic clock). NO_DEADLINE = no deadline.
inline_payload: [u8; 16]When payload_slot == u32::MAX, payload lives here. No alignment guarantees beyond u8.
Implementations§
Source§impl MsgDescHot
impl MsgDescHot
Sourcepub const fn has_deadline(&self) -> bool
pub const fn has_deadline(&self) -> bool
Returns true if this frame has a deadline set.
Sourcepub fn is_expired(&self, now_ns: u64) -> bool
pub fn is_expired(&self, now_ns: u64) -> bool
Check if the deadline has passed.
Returns true if the frame has a deadline and it has expired.
Sourcepub const fn is_control(&self) -> bool
pub const fn is_control(&self) -> bool
Returns true if this is a control frame (channel 0).
Sourcepub fn inline_payload(&self) -> &[u8] ⓘ
pub fn inline_payload(&self) -> &[u8] ⓘ
Get inline payload slice (only valid if is_inline()).
Trait Implementations§
Source§impl Clone for MsgDescHot
impl Clone for MsgDescHot
Source§fn clone(&self) -> MsgDescHot
fn clone(&self) -> MsgDescHot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more