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

Method new

pulley/src/decode.rs:131–136  ·  view source on GitHub ↗

Create a new `SafeBytecodeStream` from the given slice and with an initial position pointing at the start of the slice.

(bytecode: &'a [u8])

Source from the content-addressed store, hash-verified

129 /// Create a new `SafeBytecodeStream` from the given slice and with an
130 /// initial position pointing at the start of the slice.
131 pub fn new(bytecode: &'a [u8]) -> Self {
132 Self {
133 bytecode,
134 position: 0,
135 }
136 }
137
138 /// Get this stream's current position within its underlying slice.
139 pub fn position(&self) -> usize {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected