Struct rustpython_compiler_core::bytecode::OpArg
source · #[repr(transparent)]pub struct OpArg(pub u32);
Expand description
a full 32-bit op_arg, including any possible ExtendedArg extension
Tuple Fields§
§0: u32
Implementations§
source§impl OpArg
impl OpArg
pub const fn null() -> Self
sourcepub fn instr_size(self) -> usize
pub fn instr_size(self) -> usize
Returns how many CodeUnits a instruction with this op_arg will be encoded as
sourcepub fn split(self) -> (impl ExactSizeIterator<Item = OpArgByte>, OpArgByte)
pub fn split(self) -> (impl ExactSizeIterator<Item = OpArgByte>, OpArgByte)
returns the arg split into any necessary ExtendedArg components (in big-endian order) and the arg for the real opcode itself
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpArg
impl RefUnwindSafe for OpArg
impl Send for OpArg
impl Sync for OpArg
impl Unpin for OpArg
impl UnwindSafe for OpArg
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