pub struct ContentItem {
    pub text: String,
    pub extra: Option<Extra>,
    pub href: Option<Url>,
    pub color: Option<Color>,
    pub font: Option<String>,
    pub size: Option<usize>,
    pub command: Option<Command>,
    pub refresh: bool,
    pub image: Option<Image>,
    pub flavor_attrs: Option<Attrs>,
}
Expand description

A menu item that’s not a separator.

Fields

text: String

This menu item’s main content text.

Any | in the text will be displayed as ¦, and any newlines will be displayed as spaces.

extra: Option<Extra>

This menu item’s alternate-mode menu item or submenu.

href: Option<Url>

Corresponds to BitBar’s href= parameter.

color: Option<Color>

Corresponds to BitBar’s color= parameter.

font: Option<String>

Corresponds to BitBar’s font= parameter.

size: Option<usize>

Corresponds to BitBar’s size= parameter.

command: Option<Command>

Corresponds to BitBar’s bash=, terminal=, param1=, etc. parameters.

refresh: bool

Corresponds to BitBar’s refresh= parameter.

image: Option<Image>

Corresponds to BitBar’s image= or templateImage= parameter.

flavor_attrs: Option<Attrs>

Parameters for flavor-specific features.

Implementations

Returns a new menu item with the given text.

Any | in the text will be displayed as ¦, and any newlines will be displayed as spaces.

Adds a submenu to this menu item.

Adds a clickable link to this menu item.

Sets this menu item’s text color. Alpha channel is ignored.

Sets this menu item’s text font.

Sets this menu item’s font size.

Make this menu item run the given command when clicked.

Causes the BitBar plugin to be refreshed when this menu item is clicked.

Adds an alternate menu item, which is shown instead of this one as long as the option key ⌥ is held.

Adds a template image to this menu item.

Adds an image to this menu item. The image will not be considered a template image unless specified as such by the img parameter.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The none-equivalent value.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more