Skip to main content

reallyme_foundationdb_kit/keys/
error.rs

1// SPDX-FileCopyrightText: 2026 ReallyMe LLC
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Typed key label validation errors.
5
6use thiserror::Error;
7
8/// Stable key-label validation failures.
9#[derive(Debug, Clone, Copy, PartialEq, Eq, Error)]
10pub enum KeyLabelError {
11    /// Key labels must contain at least one byte.
12    #[error("key label is empty")]
13    Empty,
14    /// Key labels exceeded the bounded length policy.
15    #[error("key label is too long")]
16    TooLong,
17    /// Key labels contained a byte outside the allowlist.
18    #[error("key label contains an invalid byte")]
19    InvalidByte,
20}