protoschema 0.1.9

📐 Programmatically define protobuf contracts using flexible, modular and reusable elements
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::{io, path::PathBuf};

use thiserror::Error;

#[derive(Error, Debug)]
pub enum TemplatingError {
  #[error("Could not read the parent directory for {0:?}")]
  MissingParentDirectory(PathBuf),
  #[error("Could not create the directory '{dir}': {source:?}")]
  DirCreationFailure { dir: PathBuf, source: io::Error },
  #[error("Could not create the file '{file}': {source:?}")]
  FileCreationFailure { file: PathBuf, source: io::Error },
  #[error("Could not write the template to the file '{file}': {source:?}")]
  TemplateWritingFailure { file: PathBuf, source: io::Error },
}