Skip to main content

EventRouting

Trait EventRouting 

Source
pub trait EventRouting {
    const BUS: BusKind;
}
Expand description

Declares which event bus an event type belongs to.

Every event type must implement this trait (alongside Event) so the PluginRegistrar can route handler registration to the correct bus automatically. The associated constant BUS is resolved at compile time — no runtime dispatch overhead.

Implemented via the instant_event!, instant_cancellable_event!, game_event!, and game_cancellable_event! macros in basalt-api.

Required Associated Constants§

Source

const BUS: BusKind

The bus this event type is dispatched on.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl EventRouting for BlockBrokenEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for BlockEntityCreatedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for BlockEntityDestroyedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for BlockEntityModifiedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for BlockPlacedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ChatMessageEvent

Source§

const BUS: BusKind = crate::events::BusKind::Instant

Source§

impl EventRouting for CommandEvent

Source§

const BUS: BusKind = crate::events::BusKind::Instant

Source§

impl EventRouting for ContainerClickEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ContainerClosedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ContainerDragEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ContainerOpenRequestEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ContainerOpenedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for ContainerSlotChangedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingCraftedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingGridChangedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingPreCraftEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingRecipeClearedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingRecipeMatchedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for CraftingShiftClickBatchEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for PlayerInteractEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for PlayerJoinedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for PlayerLeftEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for PlayerMovedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeBookFillRequestEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeBookFilledEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeLockedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeRegisterEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeRegisteredEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeUnlockedEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game

Source§

impl EventRouting for RecipeUnregisteredEvent

Source§

const BUS: BusKind = crate::events::BusKind::Game