pub trait Type {
// Required methods
fn name(&self) -> &str;
fn new_instance(self: Rc<Self>) -> Slot;
// Provided methods
fn full_name(&self) -> String { ... }
fn as_class(self: Rc<Self>) -> Option<Rc<dyn Class>> { ... }
}Required Methods§
Sourcefn new_instance(self: Rc<Self>) -> Slot
fn new_instance(self: Rc<Self>) -> Slot
Creates a new instance of the type, returning a Slot that can be used
Provided Methods§
Sourcefn full_name(&self) -> String
fn full_name(&self) -> String
Returns the fully qualified name of the type, including any parent class names.
fn as_class(self: Rc<Self>) -> Option<Rc<dyn Class>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".