pub struct Install<'a, G: GameData> { /* private fields */ }Expand description
What Module::install declares with.
Implementations§
Source§impl<'a, G: GameData> Install<'a, G>
impl<'a, G: GameData> Install<'a, G>
Sourcepub fn state<T: Any>(&mut self, value: T)
pub fn state<T: Any>(&mut self, value: T)
Puts value on the context, where screens and the module’s hooks
find it by its type (Ctx::module_state). One value per type in
a game.
Sourcepub fn debug_entry(&mut self, make: fn() -> DebugEntry<G>)
pub fn debug_entry(&mut self, make: fn() -> DebugEntry<G>)
Adds an entry to the debug menu, after the game’s and the entries
of the modules installed before it: make makes it each time the
menu opens (DebugMenuScreen::new).
Trait Implementations§
Auto Trait Implementations§
impl<'a, G> !RefUnwindSafe for Install<'a, G>
impl<'a, G> !Send for Install<'a, G>
impl<'a, G> !Sync for Install<'a, G>
impl<'a, G> !UnwindSafe for Install<'a, G>
impl<'a, G> Freeze for Install<'a, G>
impl<'a, G> Unpin for Install<'a, G>
impl<'a, G> UnsafeUnpin for Install<'a, G>
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