Skip to main content

PyClassInit

Trait PyClassInit 

Source
pub trait PyClassInit<'py, const IS_PYCLASS: bool, const IS_INITIALIZER_TUPLE: bool> {
    // Required method
    fn init(self, cls: Borrowed<'_, 'py, PyType>) -> PyResult<Bound<'py, PyAny>>;
}

Required Methods§

Source

fn init(self, cls: Borrowed<'_, 'py, PyType>) -> PyResult<Bound<'py, PyAny>>

Implementations on Foreign Types§

Source§

impl<'py, S, B> PyClassInit<'py, false, true> for (S, B)
where S: PyClass<BaseType = B>, B: PyClass + PyClassBaseType<Initializer = PyClassInitializer<B>>, B::BaseType: PyClassBaseType<Initializer = PyNativeTypeInitializer<B::BaseType>>,

Source§

fn init(self, cls: Borrowed<'_, 'py, PyType>) -> PyResult<Bound<'py, PyAny>>

Source§

impl<'py, T, E, const IS_PYCLASS: bool, const IS_INITIALIZER_TUPLE: bool> PyClassInit<'py, IS_PYCLASS, IS_INITIALIZER_TUPLE> for Result<T, E>
where T: PyClassInit<'py, IS_PYCLASS, IS_INITIALIZER_TUPLE>, E: Into<PyErr>,

Source§

fn init(self, cls: Borrowed<'_, 'py, PyType>) -> PyResult<Bound<'py, PyAny>>

Implementors§

Source§

impl<'py, T> PyClassInit<'py, false, false> for PyClassInitializer<T>
where T: PyClass,

Source§

impl<'py, T> PyClassInit<'py, false, false> for T
where T: IntoPyObject<'py>,

Source§

impl<'py, T> PyClassInit<'py, true, false> for T

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here