Serialize the RenderBlogPost to JSON.

This struct still does not contain anything, but I'm just setting up the skeleton for this code.
This commit is contained in:
Tom Alexander
2023-10-22 16:01:42 -04:00
parent b72aec9d20
commit 0b6900eeca
6 changed files with 40 additions and 12 deletions

View File

@@ -6,6 +6,7 @@ pub(crate) enum CustomError {
TomlDeserialize(toml::de::Error),
WalkDir(walkdir::Error),
Tokio(tokio::task::JoinError),
Serde(serde_json::Error),
}
impl From<std::io::Error> for CustomError {
@@ -43,3 +44,9 @@ impl From<tokio::task::JoinError> for CustomError {
CustomError::Tokio(value)
}
}
impl From<serde_json::Error> for CustomError {
fn from(value: serde_json::Error) -> Self {
CustomError::Serde(value)
}
}