pub trait EntType {
// Required method
fn type_data() -> EntTypeData;
// Provided methods
fn type_str() -> &'static str { ... }
fn is_concrete_type() -> bool { ... }
fn wrapped_tys() -> Option<HashSet<&'static str>> { ... }
}Expand description
Represents the interface for an Ent to report its type. This should align
with [Ent::r#type()] method and is used when we must know the type
without having an instance of an ent.
Required Methods§
Sourcefn type_data() -> EntTypeData
fn type_data() -> EntTypeData
Represents data about the ent’s type
Provided Methods§
Sourcefn is_concrete_type() -> bool
fn is_concrete_type() -> bool
Indicates whether the ent represents a concrete type (like a struct) or a wrapper around one of many types (like an enum)
Sourcefn wrapped_tys() -> Option<HashSet<&'static str>>
fn wrapped_tys() -> Option<HashSet<&'static str>>
Represents the types that this ent wraps if it is not a concrete ent
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.