pub struct SharedHeader<'a> { /* private fields */ }Expand description
Accessor for a shared-memory ring header, for consumers that read the ring
in place (zero-copy) without a Host handle — e.g. a foreign driver that
holds a raw pointer to the shared linear memory.
Field offsets match [memory::OFF_*] constants and are part of the stable
wire layout (see spec/OPCODE.md).
Implementations§
Sourcepub fn frame_count(&self) -> u32
pub fn frame_count(&self) -> u32
frameCount — the completed-frame watermark.
Sourcepub fn read_cursor(&self) -> u32
pub fn read_cursor(&self) -> u32
readCursor — the slot the consumer has consumed up to (masked).
Sourcepub fn write_cursor(&self) -> u32
pub fn write_cursor(&self) -> u32
writeCursor — the slot the producer has written up to (masked).
Sourcepub fn slot_count(&self) -> u32
pub fn slot_count(&self) -> u32
slotCount — number of ring slots (power of two).
Sourcepub fn ring_offset(&self) -> usize
pub fn ring_offset(&self) -> usize
Byte offset of the ring region within the linear memory.
Sourcepub fn ring_bytes(&self) -> usize
pub fn ring_bytes(&self) -> usize
Byte length of the ring region.
Sourcepub fn arena_offset(&self) -> usize
pub fn arena_offset(&self) -> usize
Byte offset of the arena region within the linear memory.
Sourcepub fn arena_cursor(&self) -> u32
pub fn arena_cursor(&self) -> u32
Byte offset of the arena cursor.
Auto Trait Implementations§
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