Trait MenuPart
pub trait MenuPart:
Send
+ Sync
+ 'static {
// Provided method
fn menu_slot_rules(
&self,
context: &dyn LoopContext,
event: &mut MenuSlotRulesEvent<'_>,
) { ... }
}Expand description
A mod menu type’s part.
Provided Methods§
Slot placement and stack limits for registered vanilla and mod menus;
mounts use horizon:mount_inventory, while player inventory and the
creative picker have no registered type. slot is the backing index,
including player inventory slots. The slot’s own answers arrive first;
the maximum is bounded to 1–99 and the item limit. Refusal also prevents
quick-move top-ups. Runs in the restricted context on server and client
prediction; answer from the stack and context alone, and fast.
Side: both.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".