Skip to main content

rig_memory_policy/
error.rs

1//! Neutral error type for `rig-memory-policy` helpers.
2
3use thiserror::Error;
4
5/// Errors produced by [`crate::dedup`] and other policy helpers.
6///
7/// New variants are additive. The enum is `#[non_exhaustive]` so future
8/// helpers can extend it without a breaking change.
9#[derive(Debug, Error)]
10#[non_exhaustive]
11pub enum PolicyError {
12    /// An internal lock was poisoned by a previous panic. The affected
13    /// instance should be discarded.
14    #[error("internal lock poisoned")]
15    Poisoned,
16}