pub trait GridSize: Grid {
// Required method
fn default_size(world_size_type: WorldSizeType) -> Size;
// Provided method
fn world_size_type(&self) -> WorldSizeType { ... }
}Expand description
Trait for grids that can determine their world size type based on their size and provide a default size based on WorldSizeType.
Required Methods§
Sourcefn default_size(world_size_type: WorldSizeType) -> Size
fn default_size(world_size_type: WorldSizeType) -> Size
Get the default size of the grid based on its world size type. This is used to initialize the grid with a default size.
Provided Methods§
Sourcefn world_size_type(&self) -> WorldSizeType
fn world_size_type(&self) -> WorldSizeType
Get world size type of the grid based on its size.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".