Skip to main content

Crate lipgloss_list

Crate lipgloss_list 

Source
Expand description

Package list allows you to build lists, as simple or complicated as you need.

Simply, define a list with some items and set its rendering properties, like enumerator and styling:

use lipgloss_list::{List, arabic};

let groceries = List::new()
    .items(vec!["Bananas", "Barley", "Cashews", "Milk"])
    .enumerator(arabic);

println!("{}", groceries);

Re-exports§

pub use enumerator::alphabet;
pub use enumerator::arabic;
pub use enumerator::asterisk;
pub use enumerator::bullet;
pub use enumerator::dash;
pub use enumerator::roman;
pub use enumerator::Enumerator;
pub use enumerator::Indenter;
pub use List as ListType;

Modules§

enumerator

Structs§

List
List represents a list of items that can be displayed. Lists can contain lists as items, they will be rendered as nested (sub)lists.

Functions§

from_items
Creates a new list with items.
new
Creates a new list.

Type Aliases§

Items
Items represents the list items.
StyleFunc
StyleFunc is the style function that determines the style of an item.