Skip to main content

DimensionsRegistrar

Trait DimensionsRegistrar 

pub trait DimensionsRegistrar {
    // Required method
    fn add_dimension(&mut self, name: &str, settings: DimensionSettings);

    // Provided method
    fn add_chunk_generator(
        &mut self,
        name: &str,
        generator: Arc<dyn ChunkGenerator>,
    ) { ... }
}
Expand description

Registrar operations for dimensions.

Required Methods§

fn add_dimension(&mut self, name: &str, settings: DimensionSettings)

Register dimension name with settings; mods reach it through register_dimension.

Provided Methods§

fn add_chunk_generator( &mut self, name: &str, generator: Arc<dyn ChunkGenerator>, )

Register chunk generator name with generator; mods reach it through register_chunk_generator.

Not on wasm: ChunkGenerator and ChunkAccess are not bound by the generated worker interface. A wasm mod’s dimension can name an already installed generator.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§