Trait MenusRegistrar
pub trait MenusRegistrar {
// Required methods
fn menu_recipe_book(
&mut self,
menu: &str,
book: &RecipeBookTypeKey,
recipe_type: &str,
layout: RecipeBookLayout,
screen: Screen,
) -> Result<(), String>;
fn attach_menu_part(
&mut self,
menu: &str,
kind: &'static str,
part: Arc<dyn MenuPart>,
);
}Expand description
Registrar operations for menus.
Required Methods§
Declare this menu’s book, authoritative recipe type and destination roles.
The menu remains content-owned; loading checks these roles against its
actual container slots and crafting declaration. screen is the existing
typed screen value, frozen here: mapped slots need finite coordinates and
its book must equal book. This screen owns client geometry and server
hidden-slot policy; these menus do not call the dynamic screen hook.
This does not turn display candidates into ingredient predicates.
Invalid ownership, unknown books, duplicate menus or malformed screen
geometry refuse installation, even when the caller ignores the error.
Attach part, of kind kind, to the mod menu type menu.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".