veryl-metadata 0.1.1

A modern hardware description language
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;
use veryl_parser::miette::{self, Diagnostic};

#[derive(Error, Diagnostic, Debug)]
pub enum MetadataError {
    #[diagnostic(code(MetadataError::FileIO), help(""))]
    #[error("file I/O error")]
    FileIO(#[from] std::io::Error),

    #[diagnostic(code(MetadataError::FileNotFound), help(""))]
    #[error("Veryl.toml is not found")]
    FileNotFound,

    #[diagnostic(code(MetadataError::Deserialize), help(""))]
    #[error("toml load failed")]
    Deserialize(#[from] toml::de::Error),
}