arostech_cli_rust/models/
menu_item.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
pub struct MenuItem {
  pub name: String,
  pub action: fn() -> (bool, String)
}

impl MenuItem {
  pub fn new(name: String, func: fn() -> (bool, String)) -> MenuItem {
    MenuItem {
      name,
      action: func
    }
  }
}