Skip to main content

OrderingHeader

Struct OrderingHeader 

Source
pub struct OrderingHeader {
    pub magic: u64,
    pub mode: AtomicU32,
    pub stamp_kind: u32,
    pub inversions: AtomicU64,
    pub shared_stamp: AtomicU64,
    pub drainer_token: AtomicU64,
    pub drainer_heartbeat: AtomicU64,
    pub drainer_epoch: AtomicU64,
    /* private fields */
}
Expand description

Ordering header. One cache line at offset 0 of the region.

Fields§

§magic: u64§mode: AtomicU32

Active OrderingMode, cross-process visible. The ordered switch is one Release store here; the in-flight backlog is retroactively ordered because the stamps were already there.

§stamp_kind: u32

StampKind discriminant. Written once at creation; openers adopt it.

§inversions: AtomicU64

Cross-producer inversions observed at pop. The runtime signal that converts the invisible ordering property into “inversions/sec observed”.

§shared_stamp: AtomicU64

Stamp counter for StampKind::SharedCounter.

§drainer_token: AtomicU64

Drainer lease: (pid << 32) | consumer_id, 0 = unleased.

§drainer_heartbeat: AtomicU64

Drainer heartbeat: last drainer_epoch value the holder confirmed liveness at.

§drainer_epoch: AtomicU64

Global epoch for heartbeat-grace takeover. Ticked by the sidecar (or any caller); mirrors OwnerLease::tick_epoch.

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> 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, 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.