pub enum AnyInstruction {
Real(Instruction),
Pseudo(PseudoInstruction),
}Variants§
Real(Instruction)
Pseudo(PseudoInstruction)
Implementations§
Source§impl AnyInstruction
impl AnyInstruction
Sourcepub const fn real(self) -> Option<Instruction>
pub const fn real(self) -> Option<Instruction>
Gets the inner value of Self::Real.
Sourcepub const fn pseudo(self) -> Option<PseudoInstruction>
pub const fn pseudo(self) -> Option<PseudoInstruction>
Gets the inner value of Self::Pseudo.
Sourcepub const fn expect_real(self) -> Instruction
pub const fn expect_real(self) -> Instruction
Same as Self::real but panics if wasn’t called on Self::Real.
§Panics
If was called on something else other than Self::Real.
Sourcepub const fn expect_pseudo(self) -> PseudoInstruction
pub const fn expect_pseudo(self) -> PseudoInstruction
Same as Self::pseudo but panics if wasn’t called on Self::Pseudo.
§Panics
If was called on something else other than Self::Pseudo.
Sourcepub fn is_block_push(&self) -> bool
pub fn is_block_push(&self) -> bool
Returns true if this is a block push pseudo instruction (SETUP_FINALLY, SETUP_CLEANUP, or SETUP_WITH).
Sourcepub fn is_pop_block(&self) -> bool
pub fn is_pop_block(&self) -> bool
Returns true if this is a POP_BLOCK pseudo instruction.
Trait Implementations§
Source§impl Clone for AnyInstruction
impl Clone for AnyInstruction
Source§fn clone(&self) -> AnyInstruction
fn clone(&self) -> AnyInstruction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AnyInstruction
impl Debug for AnyInstruction
Source§impl From<Instruction> for AnyInstruction
impl From<Instruction> for AnyInstruction
Source§fn from(value: Instruction) -> Self
fn from(value: Instruction) -> Self
Converts to this type from the input type.
Source§impl From<PseudoInstruction> for AnyInstruction
impl From<PseudoInstruction> for AnyInstruction
Source§fn from(value: PseudoInstruction) -> Self
fn from(value: PseudoInstruction) -> Self
Converts to this type from the input type.
Source§impl InstructionMetadata for AnyInstruction
impl InstructionMetadata for AnyInstruction
Source§fn 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_unconditional_jump(&self) -> bool
fn is_scope_exit(&self) -> bool
Source§fn stack_effect(&self, oparg: u32) -> i32
fn stack_effect(&self, oparg: u32) -> i32
Stack effect of
Self::stack_effect_info.Source§fn 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
fn display(&self, arg: OpArg, ctx: &impl InstrDisplayContext) -> impl Display
Source§impl TryFrom<u16> for AnyInstruction
impl TryFrom<u16> for AnyInstruction
Source§impl TryFrom<u8> for AnyInstruction
impl TryFrom<u8> for AnyInstruction
impl Copy for AnyInstruction
Auto Trait Implementations§
impl Freeze for AnyInstruction
impl RefUnwindSafe for AnyInstruction
impl Send for AnyInstruction
impl Sync for AnyInstruction
impl Unpin for AnyInstruction
impl UnsafeUnpin for AnyInstruction
impl UnwindSafe for AnyInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more