Trait it_memory_traits::MemoryWritable
source · pub trait MemoryWritable<Store: Store> {
// Required methods
fn write_byte(
&self,
store: &mut <Store as Store>::ActualStore<'_>,
offset: u32,
value: u8
);
fn write_bytes(
&self,
store: &mut <Store as Store>::ActualStore<'_>,
offset: u32,
bytes: &[u8]
);
}
Required Methods§
sourcefn write_byte(
&self,
store: &mut <Store as Store>::ActualStore<'_>,
offset: u32,
value: u8
)
fn write_byte( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, value: u8 )
This function will panic if offset
is out of bounds.
It is caller’s responsibility to check if the offset is in bounds
using MemoryView::check_bounds
function.
sourcefn write_bytes(
&self,
store: &mut <Store as Store>::ActualStore<'_>,
offset: u32,
bytes: &[u8]
)
fn write_bytes( &self, store: &mut <Store as Store>::ActualStore<'_>, offset: u32, bytes: &[u8] )
This function will panic if [offset..offset + bytes.len()]
.is out of bounds.
It is caller’s responsibility to check if the offset is in bounds
using MemoryView::check_bounds
function.