Skip to main content

rskit_hook/
lib.rs

1//! Typed in-process hooks and event bus primitives.
2//!
3//! Domain-specific event payloads implement [`Event`]
4//! and are registered with [`HookRegistry::on`] using the concrete event type.
5//! This keeps hook payloads typed at the public API boundary while allowing a single injected registry to coordinate multiple event types.
6
7#![warn(missing_docs)]
8
9/// Bounded typed in-process event bus.
10pub mod bus;
11/// Typed hook registry.
12pub mod registry;
13/// Event and hook result types.
14pub mod types;
15
16pub use bus::{EventBus, EventBusConfig, EventRegistry, Subscriber};
17pub use registry::HookRegistry as Registry;
18pub use registry::{HookRegistry, LifecycleHookRegistry};
19pub use tokio_util::sync::CancellationToken;
20pub use types::{Event, EventType, HookError, HookResult};