Registry / other / inventory

inventory

JSON →
library0.3.24rscratesunverified

Typed distributed plugin registration.

# Cargo.toml [dependencies] inventory = "0.3.24"
INSTALL
IMPORT
SIG · INVENTORY
I
inventory
otherrustv0.3.24
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

submit
use inventory::submit;

Register and iterate over plugin instances.

use inventory::submit; struct MyPlugin; inventory::collect!(MyPlugin); impl MyPlugin { fn new() -> Self { MyPlugin } } submit! { MyPlugin::new() } fn main() { for plugin in inventory::iter::<MyPlugin> { // use plugin } }
Debug
Known issues
gotchaRequires the `inventory` crate to be used with a `collect!` macro and `submit!` macro; only works with `#[macro_use]` or explicit imports.
fix
Ensure `inventory` is imported and use `inventory::collect!` and `inventory::submit!` correctly.
affects: >=0.3.0
Upgrade
Version history
0.3.24latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
inventory — cargo add inventory · libregistry