firecloud-core 0.2.0

Core types and traits for FireCloud distributed storage
Documentation
//! Error types for FireCloud

use thiserror::Error;

/// Main error type for FireCloud operations
#[derive(Error, Debug)]
pub enum Error {
    #[error("IO error: {0}")]
    Io(#[from] std::io::Error),

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

    #[error("Chunk not found: {0}")]
    ChunkNotFound(String),

    #[error("File not found: {0}")]
    FileNotFound(String),

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

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

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

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

    #[error("Invalid data: {0}")]
    InvalidData(String),

    #[error("Erasure coding error: {0}")]
    ErasureCoding(String),

    #[error("{0}")]
    Other(String),
}

/// Result type alias for FireCloud operations
pub type Result<T> = std::result::Result<T, Error>;