MCPcopy Index your code
hub / github.com/explodingcamera/tinywasm / write_16

Method write_16

crates/tinywasm/src/store/memory/vec.rs:176–180  ·  view source on GitHub ↗
(&mut self, base: u64, offset: u64, bytes: [u8; 2])

Source from the content-addressed store, hash-verified

174
175 #[inline(always)]
176 fn write_16(&mut self, base: u64, offset: u64, bytes: [u8; 2]) -> core::result::Result<(), crate::Trap> {
177 let addr = checked_effective_addr::<2>(self.data.len(), base, offset)?;
178 self.data[addr..addr + 2].copy_from_slice(&bytes);
179 Ok(())
180 }
181
182 #[inline(always)]
183 fn write_32(&mut self, base: u64, offset: u64, bytes: [u8; 4]) -> core::result::Result<(), crate::Trap> {

Callers 1

storeMethod · 0.45

Calls 2

lenMethod · 0.45
copy_from_sliceMethod · 0.45

Tested by

no test coverage detected