Struct bitbar::Menu

source · []
pub struct Menu(pub Vec<MenuItem>);
Expand description

A BitBar menu.

Usually constructed by calling collect on an Iterator of MenuItems.

Tuple Fields

0: Vec<MenuItem>

Implementations

Adds a menu item to the bottom of the menu.

Trait Implementations

Formats the value using the given formatter. Read more

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

This provides the main functionality of this crate: rendering a BitBar plugin.

Note that the output this generates already includes a trailing newline, so it should be used with print! instead of println!.

Formats the value using the given formatter. Read more

Extends a collection with the contents of an iterator. Read more

🔬 This is a nightly-only experimental API. (extend_one)

Extends a collection with exactly one element.

🔬 This is a nightly-only experimental API. (extend_one)

Reserves capacity in a collection for the given number of additional elements. Read more

Performs the conversion.

Creates a value from an iterator. Read more

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

This is supported on crate features tokio or tokio02 or tokio03 only.

Displays this value as a menu, using the given template image in case of an error.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

Performs the conversion.

Displays this value as a menu, using the given template image in case of an error.

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

Sets value as a parameter of self.

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