Skip to main content

DefaultConstructor

Trait DefaultConstructor 

Source
pub trait DefaultConstructor:
    PyPayload
    + Default
    + Debug {
    // Provided method
    fn construct_and_init(
        args: Self::Args,
        vm: &VirtualMachine,
    ) -> PyResult<PyRef<Self>>
       where Self: Initializer { ... }
}

Provided Methods§

Source

fn construct_and_init( args: Self::Args, vm: &VirtualMachine, ) -> PyResult<PyRef<Self>>
where Self: Initializer,

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§