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.