pub struct ScreenHook<G: GameData> {
pub name: &'static str,
pub open: fn(&Ctx<G>) -> Box<dyn Screen<G>>,
}Expand description
A screen the engine opens for the game, by name.
Fields§
§name: &'static strThe screen’s name.
open: fn(&Ctx<G>) -> Box<dyn Screen<G>>Makes the screen.
Trait Implementations§
Source§impl<G: GameData> Clone for ScreenHook<G>
impl<G: GameData> Clone for ScreenHook<G>
impl<G: GameData> Copy for ScreenHook<G>
Auto Trait Implementations§
impl<G> Freeze for ScreenHook<G>
impl<G> RefUnwindSafe for ScreenHook<G>
impl<G> Send for ScreenHook<G>
impl<G> Sync for ScreenHook<G>
impl<G> Unpin for ScreenHook<G>
impl<G> UnsafeUnpin for ScreenHook<G>
impl<G> UnwindSafe for ScreenHook<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