daml-codegen 0.3.0

Daml GRPC Ledger API Code Generator
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use daml_lf::DamlLfError;

/// Daml code generator errors.
#[derive(Debug, thiserror::Error)]
pub enum DamlCodeGenError {
    /// An invalid module matcher regex was provided.
    #[error("invalid module matcher regex: {0}")]
    InvalidModuleMatcherRegex(#[from] regex::Error),
    /// Daml LF error.
    #[error("Daml LF error: {0}")]
    DamlLfError(#[from] DamlLfError),
    /// IO error.
    #[error("IO error: {0}")]
    IoError(#[from] std::io::Error),
}

/// Daml code generator result.
pub type DamlCodeGenResult<T> = Result<T, DamlCodeGenError>;