[][src]Attribute Macro bitbar_derive::main

#[main]

Annotate your main function with this.

  • 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 the tokio02 feature, which is not.)
  • It must return a Menu or a Result<Menu, E>, for some E that implements Into<Menu>. The Result in the type signature must be unqualified (::std::result::Result will not work).

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.