hyperi-rustlib 2.8.6

There's plenty of sage advice out there about how to run Rust services in production at scale — config cascades, structured logging, masking secrets, multi-backend secrets management, Prometheus, OpenTelemetry, Kafka transports, tiered disk-spillover sinks, adaptive worker pools, graceful shutdown — but almost none of it as code you can just install and use. This is that code. Opinionated, drop-in, working out of the box. The patterns from blog posts, watercooler chats and beers with your Google mates as actual library — not a framework you assemble from twenty crates and 8 weeks of munging.
Documentation
// Project:   hyperi-rustlib
// File:      src/dlq/error.rs
// Purpose:   DLQ error types
// Language:  Rust
//
// License:   BUSL-1.1
// Copyright: (c) 2026 HYPERI PTY LIMITED

//! Error types for the DLQ module.

use thiserror::Error;

/// Errors from DLQ operations.
#[derive(Debug, Error)]
pub enum DlqError {
    /// File backend I/O error.
    #[error("file DLQ I/O error: {0}")]
    Io(#[from] std::io::Error),

    /// JSON serialisation error.
    #[error("DLQ serialisation error: {0}")]
    Serialization(String),

    /// File backend error (non-I/O).
    #[error("file DLQ error: {0}")]
    File(String),

    /// Kafka backend error.
    #[cfg(feature = "dlq-kafka")]
    #[error("kafka DLQ error: {0}")]
    Kafka(String),

    /// Generic backend error (HTTP, Redis, etc.).
    #[error("DLQ backend error: {0}")]
    BackendError(String),

    /// All configured backends failed.
    #[error("all DLQ backends failed: {0}")]
    AllBackendsFailed(String),

    /// DLQ is disabled or not configured.
    #[error("DLQ not configured")]
    NotConfigured,

    /// In-memory queue is full. Caller submitted faster than the drain
    /// can write; the entry was rejected.
    #[error("DLQ queue is full")]
    QueueFull,

    /// DLQ has been shut down -- no further entries accepted.
    #[error("DLQ has shut down")]
    Closed,
}