pub trait LocalOpcode {
const CLASS_OFFSET: usize;
// Required methods
fn from_usize(value: usize) -> Self;
fn local_usize(&self) -> usize;
// Provided method
fn global_opcode(&self) -> VmOpcode { ... }
}
Required Associated Constants§
const CLASS_OFFSET: usize
Required Methods§
Sourcefn from_usize(value: usize) -> Self
fn from_usize(value: usize) -> Self
Convert from the discriminant of the enum to the typed enum variant.
Default implementation uses from_repr
.
fn local_usize(&self) -> usize
Provided Methods§
fn global_opcode(&self) -> VmOpcode
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.