pub struct HandlerRegistry<'world> { /* private fields */ }Expand description
A wrapper around &mut World to restrict the caller to
access only the add_handler method in World.
Implementations§
Source§impl HandlerRegistry<'_>
impl HandlerRegistry<'_>
Sourcepub fn register<M>(&mut self, handler: impl IntoHandler<M>)
pub fn register<M>(&mut self, handler: impl IntoHandler<M>)
Register a handler to World.
Trait Implementations§
Auto Trait Implementations§
impl<'world> Freeze for HandlerRegistry<'world>
impl<'world> !RefUnwindSafe for HandlerRegistry<'world>
impl<'world> !Send for HandlerRegistry<'world>
impl<'world> !Sync for HandlerRegistry<'world>
impl<'world> Unpin for HandlerRegistry<'world>
impl<'world> !UnwindSafe for HandlerRegistry<'world>
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