Feeding the templates into the renderer integration.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user