pub trait CppSubclassDefault<CppPeer: CppSubclassCppPeer>: CppSubclass<CppPeer> + Default {
// Required methods
fn default_rust_owned() -> Rc<RefCell<Self>>;
fn default_cpp_owned() -> UniquePtr<CppPeer> ⓘ;
}
Expand description
Provides default constructors for subclasses which implement Default
.
Required Methods§
Sourcefn default_rust_owned() -> Rc<RefCell<Self>>
fn default_rust_owned() -> Rc<RefCell<Self>>
Create a Rust-owned instance of this subclass, initializing with default values. See
CppSubclass
for more details of the ownership models available.
Sourcefn default_cpp_owned() -> UniquePtr<CppPeer> ⓘ
fn default_cpp_owned() -> UniquePtr<CppPeer> ⓘ
Create a C++-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.