pub struct OpArg(/* private fields */);Expand description
Full 32-bit op_arg, including any possible ExtendedArg extension.
Implementations§
Source§impl OpArg
impl OpArg
pub const NULL: Self
pub const fn new(value: u32) -> Self
Sourcepub const fn instr_size(self) -> usize
pub const 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§
impl Copy for OpArg
Auto Trait Implementations§
impl Freeze for OpArg
impl RefUnwindSafe for OpArg
impl Send for OpArg
impl Sync for OpArg
impl Unpin for OpArg
impl UnsafeUnpin 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
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