Trait CauldronInteractions
pub trait CauldronInteractions {
// Required methods
fn register(
&mut self,
block: BlockKey,
item: ItemKey,
handler: Arc<dyn Interaction>,
) -> Result<(), CauldronRegistrationError>;
fn register_to_all(
&mut self,
item: ItemKey,
handler: Arc<dyn Interaction>,
) -> Result<(), CauldronRegistrationError>;
}Expand description
Prepared dispatcher registration, corresponding to NeoForge’s documented Dispatcher phase.
Required Methods§
fn register(
&mut self,
block: BlockKey,
item: ItemKey,
handler: Arc<dyn Interaction>,
) -> Result<(), CauldronRegistrationError>
fn register( &mut self, block: BlockKey, item: ItemKey, handler: Arc<dyn Interaction>, ) -> Result<(), CauldronRegistrationError>
Register an exact item entry for a block’s dispatcher; vanilla entries also own their slots. Admission errors are returned immediately and stored: ignoring an error still fails the whole preparation when it finishes, leaving the published snapshot unchanged.
fn register_to_all(
&mut self,
item: ItemKey,
handler: Arc<dyn Interaction>,
) -> Result<(), CauldronRegistrationError>
fn register_to_all( &mut self, item: ItemKey, handler: Arc<dyn Interaction>, ) -> Result<(), CauldronRegistrationError>
Queue registration over the complete prepared dispatcher set, including later declarations. Item admission errors are returned and stored. Conflicts are discovered when preparation finishes and fail the whole preparation with both owners; this method does not return Duplicate.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".