openvm_instructions

Trait LocalOpcode

Source
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§

Required Methods§

Source

fn from_usize(value: usize) -> Self

Convert from the discriminant of the enum to the typed enum variant. Default implementation uses from_repr.

Source

fn local_usize(&self) -> usize

Provided Methods§

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.

Implementors§