pub trait MapTransitionProvider<M: MapTrait> {
// Required methods
fn resolve_map_id(&self, name: &str) -> Option<M>;
fn get_map_dimensions(&self, map: M) -> (u8, u8);
}Expand description
Provider trait for map data needed by transition calculations.
This trait allows the transition functions to resolve map names to typed IDs and query map dimensions without depending on any specific game’s data loading mechanism.
Required Methods§
Sourcefn resolve_map_id(&self, name: &str) -> Option<M>
fn resolve_map_id(&self, name: &str) -> Option<M>
Resolve a map name string to a typed map ID.
Sourcefn get_map_dimensions(&self, map: M) -> (u8, u8)
fn get_map_dimensions(&self, map: M) -> (u8, u8)
Get the dimensions (width, height) of a map in blocks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".