Menu

Derive Macro Menu 

Source
#[derive(Menu)]
{
    // Attributes available to this derive:
    #[menu]
}
Expand description

The derive(Menu) procedural macro.

It allows to easily build CLI menus, by using the ezmenulib crate.

ยงExample

use ezmenu::lib::MenuVec;
use ezmenu::MenuVec;

#[derive(Menu)]
#[menu(
    title = "mkLicense program",
    chip = "--> Give the "
    prefix = ">> ",
    new_line = true,
)]
struct License {
    #[menu(msg = "authors name separated by spaces")]
    authors: MenuVec<String>,

    #[menu(msg = "project name")]
    proj_name: String,

    #[menu(msg = "project year", default = 2022)]
    year: u16,
}