openvm_instructions

Trait UsizeOpcode

Source
pub trait UsizeOpcode {
    // Required methods
    fn default_offset() -> usize;
    fn from_usize(value: usize) -> Self;
    fn as_usize(&self) -> usize;

    // Provided method
    fn with_default_offset(&self) -> usize { ... }
}

Required Methods§

Source

fn default_offset() -> usize

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