pub struct DebugEntry<G: GameData> { /* private fields */ }Expand description
One tool on the debug menu: what the menu calls it (which may name
something in ctx, such as a look in use) and what choosing it does.
Implementations§
Source§impl<G: GameData> DebugEntry<G>
impl<G: GameData> DebugEntry<G>
Sourcepub fn new(
label: &'static str,
run: impl FnMut(&mut Ctx<G>) -> Transition<G> + 'static,
) -> Self
pub fn new( label: &'static str, run: impl FnMut(&mut Ctx<G>) -> Transition<G> + 'static, ) -> Self
A tool called label.
Sourcepub fn named(
label: impl Fn(&Ctx<G>) -> String + 'static,
run: impl FnMut(&mut Ctx<G>) -> Transition<G> + 'static,
) -> Self
pub fn named( label: impl Fn(&Ctx<G>) -> String + 'static, run: impl FnMut(&mut Ctx<G>) -> Transition<G> + 'static, ) -> Self
A tool whose name label reads from the context each time the menu
is drawn after it runs.
Sourcepub fn run(&mut self, ctx: &mut Ctx<G>) -> Transition<G>
pub fn run(&mut self, ctx: &mut Ctx<G>) -> Transition<G>
Runs it.
Trait Implementations§
Auto Trait Implementations§
impl<G> !RefUnwindSafe for DebugEntry<G>
impl<G> !Send for DebugEntry<G>
impl<G> !Sync for DebugEntry<G>
impl<G> !UnwindSafe for DebugEntry<G>
impl<G> Freeze for DebugEntry<G>
impl<G> Unpin for DebugEntry<G>
impl<G> UnsafeUnpin for DebugEntry<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