#[repr(C)]pub struct SabHeader {
pub state: AtomicU64,
pub tick: AtomicU64,
}Expand description
The header for the SharedArrayBuffer.
state packs entity_count (high 32 bits) and flip_bit (low 32 bits) into a
single AtomicU64 so that readers always observe a consistent pair with a single
acquire load, eliminating the TOCTOU window that existed when they were separate
AtomicU32 fields.
Fields§
§state: AtomicU64Packed atomic state: high 32 bits = entity_count, low 32 bits = flip_bit (0 or 1).
Updated with a single Release store in commit_write.
tick: AtomicU64The latest server tick corresponding to the data in the active buffer.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for SabHeader
impl RefUnwindSafe for SabHeader
impl Send for SabHeader
impl Sync for SabHeader
impl Unpin for SabHeader
impl UnsafeUnpin for SabHeader
impl UnwindSafe for SabHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request