Attribute Macro bitbar_derive::main [−][src]
#[main]
Annotate your main
function with this.
- It must take no arguments.
- It must return a member of the
bitbar::MainOutput
trait. - It can be a
fn
or anasync fn
. In the latter case,tokio
's threaded runtime will be used. (This requires thetokio
feature, which is on by default, or either of thetokio02
ortokio03
features, which are not.)
The main
attribute optionally takes a parameter error_template_image
which can be set to a path (relative to the current file) to a PNG file which will be used as the template image for the menu when displaying an error.