Skip to main content

RecipeBooksRegistrar

Trait RecipeBooksRegistrar 

pub trait RecipeBooksRegistrar {
    // Required method
    fn recipe_book_type(
        &mut self,
        id: &str,
    ) -> Result<RecipeBookTypeKey, String>;
}
Expand description

Operations available during the existing shared mod registration phase.

Required Methods§

fn recipe_book_type(&mut self, id: &str) -> Result<RecipeBookTypeKey, String>

Register an explicit lowercase namespace:path in any manifest-owned namespace. IDs are limited to 256 bytes and 1024 books in total. Invalid or duplicate declarations refuse installation even if the caller ignores the error. The registry freezes when registration ends, before player state is loaded.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§