pub struct Frame<'a> { /* private fields */ }Expand description
A completed frame produced by the guest: a sequence of opcodes plus arena access.
Frame is the transport seam: both the shared-memory ring (Host) and
network batch decoders produce frame views, so consumers such as
RenderTree::apply_frame work identically regardless of origin.
Implementations§
Source§impl<'a> Frame<'a>
impl<'a> Frame<'a>
Sourcepub fn from_parts(
slots: &'a [u8],
arena: &'a [u8],
start: usize,
end: usize,
) -> Self
pub fn from_parts( slots: &'a [u8], arena: &'a [u8], start: usize, end: usize, ) -> Self
Construct a frame view over contiguous 16-byte opcode slots plus an
arena region (start/end are byte offsets into slots).
Used by transport backends to produce Frame views over their own
buffers; Host builds these internally from the ring.
pub fn is_empty(&self) -> bool
Sourcepub fn arena_get(&self, offset: u32) -> Result<&'a [u8], ArenaError>
pub fn arena_get(&self, offset: u32) -> Result<&'a [u8], ArenaError>
Read an arena entry by offset (see Guest::alloc / Guest::alloc_str).
Auto Trait Implementations§
impl<'a> Forget for Frame<'a>
impl<'a> Freeze for Frame<'a>
impl<'a> RefUnwindSafe for Frame<'a>
impl<'a> Send for Frame<'a>
impl<'a> Sync for Frame<'a>
impl<'a> Unpin for Frame<'a>
impl<'a> UnsafeUnpin for Frame<'a>
impl<'a> UnwindSafe for Frame<'a>
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