Struct rustpython_vm::protocol::PyCallable
source · pub struct PyCallable<'a> {
pub obj: &'a PyObject,
pub call: fn(_: &PyObject, _: FuncArgs, _: &VirtualMachine) -> PyResult,
}
Fields§
§obj: &'a PyObject
§call: fn(_: &PyObject, _: FuncArgs, _: &VirtualMachine) -> PyResult
Implementations§
source§impl<'a> PyCallable<'a>
impl<'a> PyCallable<'a>
pub fn new(obj: &'a PyObject) -> Option<Self>
pub fn invoke(&self, args: impl IntoFuncArgs, vm: &VirtualMachine) -> PyResult
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PyCallable<'a>
impl<'a> !Send for PyCallable<'a>
impl<'a> !Sync for PyCallable<'a>
impl<'a> Unpin for PyCallable<'a>
impl<'a> !UnwindSafe for PyCallable<'a>
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