Skip to content

Instantly share code, notes, and snippets.

@thejpster
Created February 4, 2018 21:02
Show Gist options
  • Save thejpster/4f9686273e107e1a7b20f27a44eae9ff to your computer and use it in GitHub Desktop.
Save thejpster/4f9686273e107e1a7b20f27a44eae9ff to your computer and use it in GitHub Desktop.
Example menu run-through...
$ cargo run --example simple
Compiling menu v0.1.0 (file:///home/jonathan/Documents/programming/menu)
Finished dev [unoptimized + debuginfo] target(s) in 0.84 secs
Running `target/debug/examples/simple`
> In enter_root
help
foo - makes a foo appear
bar - fandoggles a bar
sub - enter sub-menu
help - print this help text.
> foo
You selected foo
In select_foo: foo
> sub
You selected sub
> help
baz - thingamobob a baz
quux - maximum quux
exit - leave this menu.
help - print this help text.
> exit
> help
foo - makes a foo appear
bar - fandoggles a bar
sub - enter sub-menu
help - print this help text.
> ^C
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment