tag

Tag list atom rendering #-prefixed labels.

struct Component

source

pub struct Component

A collection of tag labels rendered with # prefix and double-space separation.

Field Type Description
labels Vec<String> Tag names without the #, shown in the given order.
style Style Style painted over each #label, but not the spaces between them.

Implements Display.

Component::new

source

pub fn new(labels: Vec<String>, style: Style) -> Self

Create a tag display from a list of labels with the given style.

Parameter Type Description
labels Vec<String> the tag names, without the #
style Style the style for each tag
returns Self The tag list, ready to display; it shows nothing when labels is empty.