pub trait VM<Op, Val, T: VMValue<Op, Val, T>> {
type Error;
// Required methods
fn run(&mut self) -> Result<VMStatus<Op, Val>, Self::Error>;
fn execute(&mut self) -> Result<(), Self::Error>;
fn next_byte(&mut self) -> u8;
fn next_n_bytes<const N: usize>(&mut self) -> [u8; N];
fn next_n_bytes_vec(&mut self, n: Length) -> Vec<u8> ⓘ;
// Provided methods
fn next_len(&mut self) -> Length { ... }
fn next_small_len(&mut self) -> SmallLength { ... }
fn next_str(&mut self) -> String { ... }
}
Required Associated Types§
Required Methods§
fn run(&mut self) -> Result<VMStatus<Op, Val>, Self::Error>
fn execute(&mut self) -> Result<(), Self::Error>
fn next_byte(&mut self) -> u8
fn next_n_bytes<const N: usize>(&mut self) -> [u8; N]
fn next_n_bytes_vec(&mut self, n: Length) -> Vec<u8> ⓘ
Provided Methods§
fn next_len(&mut self) -> Length
fn next_small_len(&mut self) -> SmallLength
fn next_str(&mut self) -> String
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.