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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user