pub trait StaticType {
// Required method
fn static_cell() -> &'static StaticCell<PyTypeRef>;
// Provided methods
fn static_metaclass() -> &'static Py<PyType> { ... }
fn static_baseclass() -> &'static Py<PyType> { ... }
fn static_type() -> &'static Py<PyType> { ... }
fn init_manually(typ: PyTypeRef) -> &'static Py<PyType> { ... }
fn init_builtin_type() -> &'static Py<PyType>
where Self: PyClassImpl { ... }
fn create_static_type() -> PyTypeRef
where Self: PyClassImpl { ... }
}
Required Methods§
fn static_cell() -> &'static StaticCell<PyTypeRef>
Provided Methods§
fn static_metaclass() -> &'static Py<PyType>
fn static_baseclass() -> &'static Py<PyType>
fn static_type() -> &'static Py<PyType>
fn init_manually(typ: PyTypeRef) -> &'static Py<PyType>
fn init_builtin_type() -> &'static Py<PyType>where
Self: PyClassImpl,
fn create_static_type() -> PyTypeRefwhere
Self: PyClassImpl,
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.