ps-datachunk 0.1.0-38

Chunk-based data encrypter
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum DataChunkError {
    #[error(transparent)]
    Decryption(#[from] ps_cypher::DecryptionError),
    #[error(transparent)]
    Encryption(#[from] ps_cypher::EncryptionError),
    #[error(transparent)]
    Hash(#[from] ps_hash::HashError),
    #[error("The hash of a chunk was incorrect")]
    HashMismatch,
    #[error("Rkyv deserialization failed")]
    InvalidArchive,
    #[error("Rkyv serialization failed")]
    Serialization,
}

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