Feeding the templates into the renderer integration.

This commit is contained in:
Tom Alexander
2023-10-22 17:31:12 -04:00
parent fc5342adce
commit ce0819e85b
6 changed files with 89 additions and 16 deletions

View File

@@ -1,3 +1,6 @@
use std::str::Utf8Error;
use std::string::FromUtf8Error;
#[derive(Debug)]
pub(crate) enum CustomError {
Static(&'static str),
@@ -7,6 +10,8 @@ pub(crate) enum CustomError {
WalkDir(walkdir::Error),
Tokio(tokio::task::JoinError),
Serde(serde_json::Error),
Utf8(Utf8Error),
FromUtf8(FromUtf8Error),
}
impl From<std::io::Error> for CustomError {
@@ -50,3 +55,15 @@ impl From<serde_json::Error> for CustomError {
CustomError::Serde(value)
}
}
impl From<Utf8Error> for CustomError {
fn from(value: Utf8Error) -> Self {
CustomError::Utf8(value)
}
}
impl From<FromUtf8Error> for CustomError {
fn from(value: FromUtf8Error) -> Self {
CustomError::FromUtf8(value)
}
}