Struct rustpython_compiler_core::bytecode::Arg
source · pub struct Arg<T: OpArgType>(/* private fields */);
Implementations§
source§impl<T: OpArgType> Arg<T>
impl<T: OpArgType> Arg<T>
pub fn marker() -> Self
pub fn new(arg: T) -> (Self, OpArg)
pub fn new_single(arg: T) -> (Self, OpArgByte)
pub fn get(self, arg: OpArg) -> T
pub fn try_get(self, arg: OpArg) -> Option<T>
sourcepub unsafe fn get_unchecked(self, arg: OpArg) -> T
pub unsafe fn get_unchecked(self, arg: OpArg) -> T
§Safety
T::from_op_arg(self) must succeed
Trait Implementations§
impl<T: Copy + OpArgType> Copy for Arg<T>
impl<T: OpArgType> Eq for Arg<T>
Auto Trait Implementations§
impl<T> Freeze for Arg<T>
impl<T> RefUnwindSafe for Arg<T>
impl<T> Send for Arg<T>
impl<T> Sync for Arg<T>
impl<T> Unpin for Arg<T>
impl<T> UnwindSafe for Arg<T>
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