Attribute Macro bitbar_derive::fallback_command [−][src]
#[fallback_command]Expand description
Registers a function that is called when no other bitbar::command matches.
- It must take as arguments the subcommand name as an
OsStringand the remaining arguments as animpl Iterator<Item = OsString>. - It must return a member of the
bitbar::CommandOutputtrait. - It can be a
fnor anasync fn. In the latter case,tokio’s threaded runtime will be used. (This requires thetokiofeature, which is on by default, or either of thetokio02ortokio03features, which are not.)
If this attribute isn’t used, bitbar will handle unknown subcommands by sending a notification and exiting.
Using this requires a main function annotated with bitbar::main.