pub enum AnyInstruction {
Real(Instruction),
Pseudo(PseudoInstruction),
}Variants§
Real(Instruction)
Pseudo(PseudoInstruction)
Implementations§
Source§impl AnyInstruction
impl AnyInstruction
pub const fn is_unconditional_jump(&self) -> bool
pub const fn is_scope_exit(&self) -> bool
pub const fn is_terminator(&self) -> bool
pub const fn is_no_fallthrough(&self) -> bool
pub const fn has_target(&self) -> bool
pub const fn has_jump(&self) -> bool
pub const fn has_arg(&self) -> bool
pub const fn has_const(&self) -> bool
pub const fn has_eval_break(&self) -> bool
pub const fn is_assembler(&self) -> bool
pub fn stack_effect(&self, oparg: u32) -> i32
pub fn stack_effect_jump(&self, oparg: u32) -> i32
pub fn stack_effect_info(&self, oparg: u32) -> StackEffect
Source§impl AnyInstruction
impl AnyInstruction
Sourcepub const fn real(self) -> Option<Instruction>
pub const fn real(self) -> Option<Instruction>
Inner value of Self::Real.
Sourcepub const fn pseudo(self) -> Option<PseudoInstruction>
pub const fn pseudo(self) -> Option<PseudoInstruction>
Inner value of Self::Pseudo.
Sourcepub const fn real_opcode(self) -> Option<Opcode>
pub const fn real_opcode(self) -> Option<Opcode>
Get Self::Real as Opcode.
Sourcepub const fn pseudo_opcode(self) -> Option<PseudoOpcode>
pub const fn pseudo_opcode(self) -> Option<PseudoOpcode>
Get Self::Pseudo as PseudoOpcode.
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 const fn is_pop_block(self) -> bool
pub const fn is_pop_block(self) -> bool
Returns true if this is a PseudoInstruction::PopBlock.
Sourcepub const fn is_block_push(self) -> bool
pub const fn is_block_push(self) -> bool
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for AnyInstruction
Source§impl Debug for AnyInstruction
impl Debug for AnyInstruction
Source§impl From<AnyInstruction> for AnyOpcode
impl From<AnyInstruction> for AnyOpcode
Source§fn from(value: AnyInstruction) -> AnyOpcode
fn from(value: AnyInstruction) -> AnyOpcode
Converts to this type from the input type.
Source§impl From<AnyOpcode> for AnyInstruction
impl From<AnyOpcode> for AnyInstruction
Source§fn from(value: AnyOpcode) -> AnyInstruction
fn from(value: AnyOpcode) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<Instruction> for AnyInstruction
impl From<Instruction> for AnyInstruction
Source§fn from(value: Instruction) -> AnyInstruction
fn from(value: Instruction) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<Opcode> for AnyInstruction
impl From<Opcode> for AnyInstruction
Source§fn from(value: Opcode) -> AnyInstruction
fn from(value: Opcode) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<PseudoInstruction> for AnyInstruction
impl From<PseudoInstruction> for AnyInstruction
Source§fn from(value: PseudoInstruction) -> AnyInstruction
fn from(value: PseudoInstruction) -> AnyInstruction
Converts to this type from the input type.
Source§impl From<PseudoOpcode> for AnyInstruction
impl From<PseudoOpcode> for AnyInstruction
Source§fn from(value: PseudoOpcode) -> AnyInstruction
fn from(value: PseudoOpcode) -> AnyInstruction
Converts to this type from the input type.
Source§impl TryFrom<u8> for AnyInstruction
impl TryFrom<u8> for AnyInstruction
Source§type Error = MarshalError
type Error = MarshalError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u8,
) -> Result<AnyInstruction, <AnyInstruction as TryFrom<u8>>::Error>
fn try_from( value: u8, ) -> Result<AnyInstruction, <AnyInstruction as TryFrom<u8>>::Error>
Performs the conversion.
Source§impl TryFrom<u16> for AnyInstruction
impl TryFrom<u16> for AnyInstruction
Source§type Error = MarshalError
type Error = MarshalError
The type returned in the event of a conversion error.
Source§fn try_from(
value: u16,
) -> Result<AnyInstruction, <AnyInstruction as TryFrom<u16>>::Error>
fn try_from( value: u16, ) -> Result<AnyInstruction, <AnyInstruction as TryFrom<u16>>::Error>
Performs the conversion.
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> Helper for T
Source§impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
impl<T, U> ImaginaryInto<U> for Twhere
U: ImaginaryFrom<T>,
fn imaginary_into(self) -> U
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