Crate anyrun_plugin

Source
Expand description

The crate for building plugins for Anyrun.

Each plugin needs 4 functions defined, init, info, get_matches and the handler. Documentation on what each of these should be is found in their respective attribute macros. !

Re-exports§

pub use anyrun_interface;

Structs§

Match
Represents a match from a plugin
PluginInfo
Info of the plugin. Used for the main UI

Enums§

HandleResult
For determining how anyrun should proceed after the plugin has handled a match selection

Attribute Macros§

get_matches
Function that takes the current text input as an RString as the first argument, and the second argument can be one of:
handler
The function to handle the selection of an item. Takes a Match as its first argument, and the second argument can be one of:
info
Function that returns the plugin info as a PluginInfo object. Takes no arguments.
init
Function that takes an RString as the only argument, which points to the anyrun config directory. Returns the data the plugin operates on. This data is accessible as both a normal borrow and a mutable borrow to get_matches and handler.