`src/lib.rs` — the crate root
The front door of the library: declares every public module (with its feature gate), carries the crate-level documentation map, and re-exports two conveniences.
Key items
pub use tool::Tool;— the trait at the crate root, souse loopctl::Tool;works.- Under
feature = "derive": re-exportsloopctl_derive::Tool— the derive macro — so the same import brings trait and derive. pub mod __private(hidden, derive only) — re-exportsserde_jsonso downstream crates don’t need it directly for generated code.- Feature-gated modules:
hooks(feature),mcp(feature),provider(underproviders),testing(feature).
Behavior notes
#![warn(missing_docs)]— every public item in the crate is documented; the doc comments are excellent primary reading.numericispub(crate)— internal safe math, intentionally not public.- Test builds relax the strict no-unwrap clippy set — production code never panics, test code may assert freely.
Deep dive: the codebase map.