//! Error type for the L0 crate.

/// Errors produced by canonical encoding and ID computation.
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// CBOR encoding failed.
    #[error("canonical encode: {0}")]
    Encode(String),
    /// CBOR decoding failed.
    #[error("canonical decode: {0}")]
    Decode(String),
}

/// Convenience alias.
pub type Result<T> = std::result::Result<T, Error>;
