[][src]Crate menu

Menu

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

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

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 Definitions

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.