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 an async fn. In the latter case, tokio's threaded runtime will be used. (This requires the tokio feature, which is on by default, or either of the tokio02 or tokio03 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.