MsgDescHot

Struct MsgDescHot 

Source
#[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: u64

Unique message ID per session, monotonic.

§channel_id: u32

Logical stream (0 = control channel).

§method_id: u32

For RPC dispatch, or control verb.

§payload_slot: u32

Slot index (u32::MAX = inline).

§payload_generation: u32

Generation counter for ABA safety.

§payload_offset: u32

Offset within slot.

§payload_len: u32

Actual payload length.

§flags: FrameFlags

Frame flags (EOS, CANCEL, ERROR, etc.).

§credit_grant: u32

Credits being granted to peer.

§deadline_ns: u64

Deadline 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

Source

pub const fn new() -> Self

Create a new descriptor with default values.

Source

pub const fn has_deadline(&self) -> bool

Returns true if this frame has a deadline set.

Source

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.

Source

pub const fn is_inline(&self) -> bool

Returns true if payload is inline (not in a slot).

Source

pub const fn is_control(&self) -> bool

Returns true if this is a control frame (channel 0).

Source

pub fn inline_payload(&self) -> &[u8]

Get inline payload slice (only valid if is_inline()).

Trait Implementations§

Source§

impl Clone for MsgDescHot

Source§

fn clone(&self) -> MsgDescHot

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 MsgDescHot

Source§

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

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

impl Default for MsgDescHot

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for MsgDescHot

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more