Expand description
This is the interface library between the main gravel application and individual plugins.
[abi_stable] is used to facilitate safe FFI across compiler versions.
Modules§
- logging
- Plumbing for using the
logcrate across FFI-boundaries. - paths
- Defines useful functions for working with common paths.
- prelude
- This module re-exports the types needed to write plugins.
Structs§
- HitCache
- Container for hits than can be re-used.
- Plugin
Config Adapter - Abstracts config deserialization from plugins, allowing differing configuration for different plugin instances.
- Plugin
Definition - Holds metadata and a factory function for a plugin.
- Plugin
Lib - [
RootModule] for a plugin. It is auto-implemented using the macros. - Plugin
LibRef - This is the pointer to the prefix of
PluginLib. - Plugin
Metadata - Holds metadata about a plugin.
- Provider
Result - A collection of hits returned by a provider.
- Query
Result - A Collection of scored hits returned by the
FrontendContext. - Scored
Hit - Wraps an
ArcDynHitwith scoring metadata. - Simple
Hit - Standard implementation of
Hitusing closures. - Static
HitCache - Container for unchanging hits.
Enums§
- Action
Kind - Frontend
Exit Status - This is returned when a
Frontendexits and tells gravel what to do. - Frontend
Message - Represents actions the
Frontendshould take.
Constants§
Traits§
- Frontend
- Abstracts functionality required for a frontend.
- Frontend
Context - Context object providing core functionality to the
Frontend. - Frontend
Context Ext - Frontend
Inner - This trait is auto-implemented with the
crate::gravel_frontendmacro. - Hit
- This is the trait for hits returned from
crate::Providers. - HitAction
Context - Abstracts interaction between a hit action and the frontend.
- Provider
- Abstracts functionality required for a provider.
- Provider
Inner - This trait is auto-implemented with the
crate::gravel_providermacro.
Functions§
- clone_
hit_ arc - Clones an
ArcDynHit, as this is not straightforward.
Type Aliases§
- ArcDyn
Hit - FFI-safe
Hittrait object. - BoxDyn
Frontend - FFI-safe
FrontendInnertrait object. - BoxDyn
Frontend Context - FFI-safe
FrontendContexttrait object. - BoxDyn
Provider - FFI-safe
ProviderInnertrait object. - Frontend
Exit Status Ne - Non-exhaustive wrapper around
FrontendExitStatus. - Frontend
Message Ne - Non-exhaustive wrapper around
FrontendMessage. - RefDyn
HitAction Context - FFI-safe reference to a
HitActionContexttrait object.
Attribute Macros§
- gravel_
frontend - Automatically implements the necessary FFI-glue for plugins to work.
- gravel_
provider - Automatically implements the necessary FFI-glue for plugins to work.