feat(api): add Observer trait and NullObserver default

Observer replaces verbose: bool with structured progress callbacks:
on_iteration_end, on_batch_processed, on_converged — all no-op
default impls so users override only what they need. NullObserver
is a ZST default.

Send + Sync bounds deferred to T3 (Rayon support).

Fully additive — wired into History::converge in Task 12.

Part of T2 of docs/superpowers/specs/2026-04-23-trueskill-engine-redesign-design.md.
This commit is contained in:
2026-04-24 12:16:25 +02:00
parent f5a486329e
commit 726896a2ba
2 changed files with 50 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ pub mod gaussian;
mod history;
mod key_table;
mod matrix;
mod observer;
mod outcome;
mod rating;
pub(crate) mod schedule;
@@ -33,6 +34,7 @@ pub use gaussian::Gaussian;
pub use history::History;
pub use key_table::KeyTable;
use matrix::Matrix;
pub use observer::{NullObserver, Observer};
pub use outcome::Outcome;
pub use rating::Rating;
pub use schedule::ScheduleReport;