Crate menu

Source
Expand description

A basic command-line interface for #![no_std] Rust programs. Peforms zero heap allocation.

Modules§

menu_manager
The Menu Manager looks after the menu and where we currently are within it.

Structs§

Item
An Item is a what our menus are made from. Each item has a name which you have to enter to select this item. Each item can also have zero or more parameters, and some optional help text.
Menu
A Menu is made of one or more Items.
Runner
This structure handles the menu. You feed it bytes as they are read from the console and it executes menu actions when commands are typed in (followed by Enter).

Enums§

Error
Describes the ways in which the API can fail
ItemType
Do we enter a sub-menu when this command is entered, or call a specific function?
Parameter
Describes a parameter to the command

Functions§

argument_finder
Looks for the named parameter in the parameter list of the item, then finds the correct argument.

Type Aliases§

ItemCallbackFn
The type of function we call when we a valid command has been entered.
MenuCallbackFn
The type of function we call when we enter/exit a menu.