refactor(core): narrow the 1.0 public API

This commit is contained in:
2026-10-22 08:44:09 -07:00
parent 94c3a3c8ad
commit 158689e265
18 changed files with 166 additions and 95 deletions
+5
View File
@@ -13,6 +13,10 @@ use crate::observation::{Observation, ObservationId, Tick};
/// Rules are applied in the order listed here: per-topic retention, then a
/// global age cutoff, then a global count cap. Any field left as `None` is
/// ignored.
///
/// `#[non_exhaustive]`: build via [`TrimPolicy::default`] and set fields, so a
/// future 1.x can add policy knobs without a breaking change.
#[non_exhaustive]
#[derive(Clone, Debug, Default)]
pub struct TrimPolicy {
/// Keep the `N` youngest (lowest current age) observations per exact topic.
@@ -24,6 +28,7 @@ pub struct TrimPolicy {
}
/// Errors returned by [`Store`] operations.
#[non_exhaustive]
#[derive(Debug, PartialEq, Eq)]
pub enum StoreError {
/// The store is full and cannot accept new observations.