Skip to main content

Crate hjkl_holler

Crate hjkl_holler 

Source
Expand description

Renderer-agnostic notification bus: severity-tagged toasts with a ring-buffer history and auto-dismiss TTLs.

No TUI or renderer types are referenced here — the ratatui adapter lives in hjkl-holler-tui.

§Quick start

use hjkl_holler::{HollerBus, Severity};
use std::time::SystemTime;

let mut bus = HollerBus::new();
bus.info("file saved");
bus.warn("trailing whitespace");
bus.error("E45: readonly option is set");

let now = SystemTime::now();
let active: Vec<_> = bus.active(now).collect();
assert_eq!(active.len(), 3);

Structs§

Holler
A single notification entry.
HollerBus
Notification bus: push messages in, query active/history out.

Enums§

Severity
Toast severity level.

Constants§

DEFAULT_HISTORY_CAP
Maximum number of entries retained in the history ring.