pub trait InstructionMetadata {
// Required methods
fn label_arg(&self) -> Option<Arg<Label>>;
fn is_scope_exit(&self) -> bool;
fn is_unconditional_jump(&self) -> bool;
fn stack_effect_info(&self, oparg: u32) -> StackEffect;
fn fmt_dis(
&self,
arg: OpArg,
f: &mut Formatter<'_>,
ctx: &impl InstrDisplayContext,
expand_code_objects: bool,
pad: usize,
level: usize,
) -> Result<(), Error>;
// Provided methods
fn stack_effect(&self, oparg: u32) -> i32 { ... }
fn display(
&self,
arg: OpArg,
ctx: &impl InstrDisplayContext,
) -> impl Display { ... }
}Required Methods§
Sourcefn label_arg(&self) -> Option<Arg<Label>>
fn label_arg(&self) -> Option<Arg<Label>>
Gets the label stored inside this instruction, if it exists.
fn is_scope_exit(&self) -> bool
fn is_unconditional_jump(&self) -> bool
Sourcefn stack_effect_info(&self, oparg: u32) -> StackEffect
fn stack_effect_info(&self, oparg: u32) -> StackEffect
Stack effect info for how many items are pushed/popped from the stack, for this instruction.
fn fmt_dis( &self, arg: OpArg, f: &mut Formatter<'_>, ctx: &impl InstrDisplayContext, expand_code_objects: bool, pad: usize, level: usize, ) -> Result<(), Error>
Provided Methods§
Sourcefn stack_effect(&self, oparg: u32) -> i32
fn stack_effect(&self, oparg: u32) -> i32
Stack effect of Self::stack_effect_info.
fn display(&self, arg: OpArg, ctx: &impl InstrDisplayContext) -> impl Display
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.