autocxx::subclass

Trait CppSubclassSelfOwnedDefault

Source
pub trait CppSubclassSelfOwnedDefault<CppPeer: CppSubclassCppPeer>: CppSubclassSelfOwned<CppPeer> + Default {
    // Required method
    fn default_self_owned() -> Rc<RefCell<Self>>;
}
Expand description

Provides default constructors for subclasses which implement Default and are self-owning.

Required Methods§

Source

fn default_self_owned() -> Rc<RefCell<Self>>

Create a self-owned instance of this subclass, initializing with default values. See CppSubclass for more details of the ownership models available.

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§

Source§

impl<T, CppPeer> CppSubclassSelfOwnedDefault<CppPeer> for T
where T: CppSubclassSelfOwned<CppPeer> + Default, CppPeer: CppSubclassCppPeer,