pub trait BlockModule:
Exhaust
+ Debug
+ Display
+ Eq
+ Hash
+ Clone {
// Required method
fn namespace() -> &'static str;
}Expand description
Types whose values identify blocks in a set of related blocks, which may be
stored in a BlockProvider or under specific names in a Universe.
The names of the Universe’s corresponding BlockDefs are formed by
combining the namespace() and self.to_string() (the
Display trait implementation).
Implement this trait for an enum, then use the functions of
BlockProvider to work with the described set of blocks.
TODO: consider replacing Display with a separate method so as not to presume its meaning
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.