pub trait ResourceType: Sealed + Debug {
const NAME: &'static str;
}Expand description
A type that represents a specific kind of resource in the game. Implementors of this trait represent different resource types, such as iron, copper, or science packs. Only useful as a type parameter; has no associated methods.
§Modding
To define a new resource type, use the resource_type! macro.
Required Associated Constants§
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.