pub trait Class: Object + Default {
type Super: Class + Into<Self>;
// Provided methods
fn __new__() -> Self { ... }
fn __init__<A>(&mut self, args: A) { ... }
}
Expand description
The Class trait is used to define Python classes. Classes are Object factories, meaning they create instances of objects.
Required Associated Types§
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.