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

Method read

pulley/src/decode.rs:150–158  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

148
149impl BytecodeStream for SafeBytecodeStream<'_> {
150 fn read<const N: usize>(&mut self) -> Result<[u8; N], Self::Error> {
151 let (bytes, rest) = self
152 .bytecode
153 .split_first_chunk()
154 .ok_or_else(|| self.unexpected_eof())?;
155 self.bytecode = rest;
156 self.position += N;
157 Ok(*bytes)
158 }
159
160 type Error = DecodingError;
161

Callers 1

decodeMethod · 0.45

Calls 4

OkFunction · 0.85
unexpected_eofMethod · 0.80
as_ptrMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected