pub struct Install<'a, G>where
G: GameData,{ /* private fields */ }Expand description
What Module::install declares with.
Implementations§
Source§impl<'a, G> Install<'a, G>where
G: GameData,
impl<'a, G> Install<'a, G>where
G: GameData,
Sourcepub fn state<T>(&mut self, value: T)where
T: Any,
pub fn state<T>(&mut self, value: T)where
T: Any,
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