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

Method blocking_read

crates/wasi-io/src/impls.rs:262–271  ·  view source on GitHub ↗
(
        &mut self,
        stream: Resource<DynInputStream>,
        len: u64,
    )

Source from the content-addressed store, hash-verified

260 }
261
262 async fn blocking_read(
263 &mut self,
264 stream: Resource<DynInputStream>,
265 len: u64,
266 ) -> StreamResult<Vec<u8>> {
267 let len = len.try_into().unwrap_or(usize::MAX);
268 let bytes = self.get_mut(&stream)?.blocking_read(len).await?;
269 debug_assert!(bytes.len() <= len);
270 Ok(bytes.into())
271 }
272
273 fn skip(&mut self, stream: Resource<DynInputStream>, len: u64) -> StreamResult<u64> {
274 let len = len.try_into().unwrap_or(usize::MAX);

Callers 11

readMethod · 0.45
blocking_read_to_endMethod · 0.45
mainFunction · 0.45
readFunction · 0.45
read_file_bigFunction · 0.45
read_tcp_bigFunction · 0.45
blocking_spliceMethod · 0.45

Calls 3

OkFunction · 0.85
try_intoMethod · 0.45
get_mutMethod · 0.45