Struct rustpython_vm::bytecode::Arg
source · pub struct Arg<T>(_)
where
T: OpArgType;
Implementations§
source§impl<T> Arg<T>where
T: OpArgType,
impl<T> Arg<T>where T: OpArgType,
pub fn marker() -> Arg<T>
pub fn new(arg: T) -> (Arg<T>, OpArg)
pub fn new_single(arg: T) -> (Arg<T>, OpArgByte)where T: Into<u8>,
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 for Arg<T>where T: Copy + OpArgType,
impl<T> Eq for Arg<T>where T: OpArgType,
Auto Trait Implementations§
impl<T> RefUnwindSafe for Arg<T>where T: RefUnwindSafe,
impl<T> Send for Arg<T>where T: Send,
impl<T> Sync for Arg<T>where T: Sync,
impl<T> Unpin for Arg<T>where T: Unpin,
impl<T> UnwindSafe for Arg<T>where T: UnwindSafe,
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.