pub trait Object {
// Required method
fn construct() -> Self;
}
Expand description
自定义对象
其需要实现一个构造函数,用于初始化分配的内存
Required 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.