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

Method write

crates/tinywasm/src/reference.rs:120–125  ·  view source on GitHub ↗
(&mut self, buf: &[u8])

Source from the content-addressed store, hash-verified

118#[cfg(feature = "std")]
119impl crate::std::io::Write for MemoryCursor<'_> {
120 fn write(&mut self, buf: &[u8]) -> crate::std::io::Result<usize> {
121 let offset = self.offset()?;
122 let written = self.memory.inner.write(offset, buf);
123 self.advance(written)?;
124 Ok(written)
125 }
126
127 fn flush(&mut self) -> crate::std::io::Result<()> {
128 Ok(())

Callers 2

open_mode_optionsMethod · 0.45
build_importsFunction · 0.45

Calls 3

advanceMethod · 0.80
instance_mutMethod · 0.80
offsetMethod · 0.45

Tested by

no test coverage detected