[−][src]Attribute Macro bitbar_derive::main
#[main]
Annotate your main
function with this.
- 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 thetokio02
feature, which is not.) - It must return a
Menu
or aResult<Menu, E>
, for someE
that implementsInto<Menu>
. TheResult
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.