pub struct EventSystem { /* private fields */ }Expand description
Workspace-wide event bus: a frame-scoped mailbox, not a persistent log.
publish queues an event by its concrete type;
drain removes and returns every event of that type
published since the last drain. This is what lets subsystems
communicate without depending on each other directly — e.g. a future
physics-core contact could be published here and consumed by
audio-core for an impact sound, without either crate knowing the
other exists (see docs/dependency-rules.md rule 7: only engine-core
is allowed to know about both).
Implementations§
Trait Implementations§
Source§impl Debug for EventSystem
impl Debug for EventSystem
Source§impl Default for EventSystem
impl Default for EventSystem
Source§fn default() -> EventSystem
fn default() -> EventSystem
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for EventSystem
impl !Send for EventSystem
impl !Sync for EventSystem
impl !UnwindSafe for EventSystem
impl Freeze for EventSystem
impl Unpin for EventSystem
impl UnsafeUnpin for EventSystem
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.