fireblocks-config 0.1.12

TOML configuration for fireblocks SDK
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("config not found {0}")]
    ConfigNotFound(String),

    #[error(transparent)]
    ConfigParseError(#[from] config::ConfigError),

    #[error(transparent)]
    IO(#[from] std::io::Error),

    #[error("missing secret key. Check your configuration file or set env FIREBLOCKS_SECRET")]
    MissingSecret,

    #[error("{asset} not found")]
    AssetNotFound { asset: String },

    #[error("IO error for file {path:?}: {source}")]
    IOError {
        source: std::io::Error,
        path: String,
    },

    #[error("Invalid Duration {0}")]
    InvalidDuration(String),

    #[error("Key '{key}' not present in configuration")]
    NotPresent { key: String },

    #[cfg(feature = "gpg")]
    #[error(transparent)]
    GpgError(#[from] gpgme::Error),

    #[error("XDG config directory not found")]
    XdgConfigNotFound,

    #[error("Profile config not found: {0}")]
    ProfileConfigNotFound(String),
}