#[repr(C)]pub struct Outbox {
pub emit: u32,
pub bytes_ptr: u32,
pub bytes_len: u32,
pub bounds_ptr: u32,
pub bounds_len: u32,
pub flags: u32,
pub message_ptr: u32,
pub message_len: u32,
pub pace_ns: u64,
pub logs_ptr: u32,
pub logs_len: u32,
}Expand description
What a call left behind for the host.
Fixed layout, little-endian, TOCAT_OUTBOX_LEN bytes. repr(C) rather
than packed: wasm32 puts the u64 on an eight-byte boundary, which is
where offset 32 already is, so there is no padding to remove and no
unaligned field to read. The assertions below are what keep that true on
every target this crate is built for, including the 64-bit host that reads
the struct back out of guest memory.
Fields§
§emit: u32§bytes_ptr: u32§bytes_len: u32§bounds_ptr: u32§bounds_len: u32§flags: u32§message_ptr: u32§message_len: u32§pace_ns: u64§logs_ptr: u32§logs_len: u32Implementations§
Source§impl Outbox
impl Outbox
pub const fn new() -> Outbox
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Clear it. The struct persists between calls, so a halt flag or a message pointer left over from an earlier chunk would be applied again.
pub const fn emit(&self) -> Option<Emit>
pub const fn set_emit(&mut self, emit: Emit)
pub const fn has(&self, flag: u32) -> bool
pub const fn set(&mut self, flag: u32)
Trait Implementations§
impl Copy for Outbox
impl Eq for Outbox
impl StructuralPartialEq for Outbox
Auto Trait Implementations§
impl Freeze for Outbox
impl RefUnwindSafe for Outbox
impl Send for Outbox
impl Sync for Outbox
impl Unpin for Outbox
impl UnsafeUnpin for Outbox
impl UnwindSafe for Outbox
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