Skip to main content

quilt_rs/object_hash/
error.rs

1//! Errors produced while computing or parsing object hashes.
2
3use thiserror::Error;
4
5/// Errors from object-hash construction, parsing, and multihash/multibase
6/// conversions.
7#[derive(Error, Debug)]
8pub enum Error {
9    #[error("Invalid multihash: {0}")]
10    InvalidMultihash(String),
11
12    #[error("Multihash error: {0}")]
13    Multihash(#[from] multihash::Error),
14
15    #[error("Multibase error: {0}")]
16    Multibase(#[from] multibase::Error),
17
18    #[error("I/O error: {0}")]
19    Io(#[from] std::io::Error),
20}