MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / raw_write

Method raw_write

crates/c-api/src/wasi.rs:176–184  ·  view source on GitHub ↗
(&self, buf: &[u8])

Source from the content-addressed store, hash-verified

174
175impl CustomOutputStreamInner {
176 pub fn raw_write(&self, buf: &[u8]) -> io::Result<usize> {
177 let wrote = (self.callback)(self.foreign_data.data, buf.as_ptr(), buf.len());
178
179 if wrote >= 0 {
180 Ok(wrote as _)
181 } else {
182 Err(io::Error::from_raw_os_error(wrote.abs() as _))
183 }
184 }
185}
186
187#[derive(Clone)]

Callers 2

writeMethod · 0.80
poll_writeMethod · 0.80

Calls 5

OkFunction · 0.85
absMethod · 0.80
from_raw_os_errorFunction · 0.50
as_ptrMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected