EntType

Trait EntType 

Source
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§

Source

fn type_data() -> EntTypeData

Represents data about the ent’s type

Provided Methods§

Source

fn type_str() -> &'static str

Returns a static str that represents the unique type for an ent

Source

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)

Source

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.

Implementors§