#[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§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MsgDescHot
impl Debug for MsgDescHot
Source§impl Default for MsgDescHot
impl Default for MsgDescHot
impl Copy for MsgDescHot
Auto Trait Implementations§
impl Freeze for MsgDescHot
impl RefUnwindSafe for MsgDescHot
impl Send for MsgDescHot
impl Sync for MsgDescHot
impl Unpin for MsgDescHot
impl UnwindSafe for MsgDescHot
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)