Trait Callable

Source
pub trait Callable: PyPayload {
    type Args: FromArgs;

    const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _;

    // Required method
    fn call(zelf: &Py<Self>, args: Self::Args, vm: &VirtualMachine) -> PyResult;

    // Provided methods
    fn slot_call(
        zelf: &PyObject,
        args: FuncArgs,
        vm: &VirtualMachine,
    ) -> PyResult { ... }
    fn __call__(
        zelf: PyObjectRef,
        args: FuncArgs,
        vm: &VirtualMachine,
    ) -> PyResult { ... }
    fn __extend_py_class(ctx: &Context, class: &'static Py<PyType>) { ... }
    fn __extend_slots(slots: &mut PyTypeSlots) { ... }
}

Provided Associated Constants§

Source

const __OWN_METHOD_DEFS: &'static [PyMethodDef] = _

Required Associated Types§

Required Methods§

Source

fn call(zelf: &Py<Self>, args: Self::Args, vm: &VirtualMachine) -> PyResult

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Morty Proxy This is a proxified and sanitized view of the page, visit original site.