rig-memory-policy 0.1.0

Backend-agnostic memory-policy primitives (frame metadata, content-hash dedup) shared by Rig memory-store adapters.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Neutral error type for `rig-memory-policy` helpers.

use thiserror::Error;

/// Errors produced by [`crate::dedup`] and other policy helpers.
///
/// New variants are additive. The enum is `#[non_exhaustive]` so future
/// helpers can extend it without a breaking change.
#[derive(Debug, Error)]
#[non_exhaustive]
pub enum PolicyError {
    /// An internal lock was poisoned by a previous panic. The affected
    /// instance should be discarded.
    #[error("internal lock poisoned")]
    Poisoned,
}