print_list

Function print_list 

Source
pub fn print_list<T: Display>(header_message: Option<&str>, items: &[T])
Expand description

Displays a list of items.

§Arguments

  • header_message - An option that can contain a string slice which holds a header message for the paginated list.
  • items - An array of items of a type with ‘Display’ trait

§Example

use simple_cli::*;
let items = vec!["Moe", "Larry", "Curly"];
print_list(Some("My list:"), &items);