Skip to main content

libid_contracts/
error.rs

1/// Crate error type.
2#[derive(Debug, thiserror::Error)]
3pub enum Error {
4    /// A vendored artifact is missing, unparsable, or malformed.
5    #[error("artifact error: {detail}")]
6    Artifact {
7        /// What went wrong.
8        detail: String,
9    },
10    /// An RPC send, receipt wait, or read failed.
11    #[error("rpc error: {detail}")]
12    Rpc {
13        /// What went wrong.
14        detail: String,
15    },
16}
17
18/// Crate result alias.
19pub type Result<T> = std::result::Result<T, Error>;