Skip to main content

StackEffectTrait

Trait StackEffectTrait 

Source
pub trait StackEffectTrait {
    // Required method
    fn stack_effect(
        &self,
        oparg: u32,
        jump: bool,
        calculate_max: bool,
    ) -> StackEffect;
}
Expand description

Should be automatically implemented by define_opcodes!()

Required Methods§

Source

fn stack_effect( &self, oparg: u32, jump: bool, calculate_max: bool, ) -> StackEffect

If the code has a jump target and jump is true, stack_effect() will return the stack effect of jumping. If jump is false, it will return the stack effect of not jumping. And if calculate_max is true, it will return the maximal stack effect of both cases.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§