clicktype-batch 0.2.0

Async batching system for ClickType with backpressure and metrics
Documentation
use thiserror::Error;

/// Errors that can occur during batching operations
#[derive(Error, Debug)]
pub enum BatchError {
    #[error("Channel closed: the batcher worker has terminated")]
    ChannelClosed,

    #[error("Channel full: the batcher is under heavy load")]
    ChannelFull,

    #[error("Flush failed: {0}")]
    FlushError(String),

    #[error("Serialization error: {0}")]
    SerializationError(String),

    #[error("Schema validation failed: {0}")]
    SchemaError(String),
}

pub type Result<T> = std::result::Result<T, BatchError>;