MCPcopy Create free account
hub / github.com/explodingcamera/tinywasm / read_exact

Method read_exact

crates/tinywasm/src/store/memory/vec.rs:69–72  ·  view source on GitHub ↗
(&self, addr: usize, dst: &mut [u8])

Source from the content-addressed store, hash-verified

67
68 #[inline(always)]
69 fn read_exact(&self, addr: usize, dst: &mut [u8]) -> Option<()> {
70 dst.copy_from_slice(self.data.get(addr..addr.checked_add(dst.len())?)?);
71 Some(())
72 }
73
74 #[inline(always)]
75 fn read_vec(&self, addr: usize, len: usize) -> Option<Vec<u8>> {

Callers 9

copy_from_memoryMethod · 0.45
copy_withinMethod · 0.45
read_16Method · 0.45
read_32Method · 0.45
read_64Method · 0.45
read_128Method · 0.45

Calls 3

copy_from_sliceMethod · 0.45
getMethod · 0.45
lenMethod · 0.45