Chunking the blog posts for the stream.
This commit is contained in:
@@ -4,6 +4,7 @@ use std::string::FromUtf8Error;
|
||||
#[derive(Debug)]
|
||||
pub(crate) enum CustomError {
|
||||
Static(&'static str),
|
||||
String(String),
|
||||
IO(std::io::Error),
|
||||
TomlSerialize(toml::ser::Error),
|
||||
TomlDeserialize(toml::de::Error),
|
||||
@@ -29,6 +30,12 @@ impl From<&'static str> for CustomError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<String> for CustomError {
|
||||
fn from(value: String) -> Self {
|
||||
CustomError::String(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<toml::ser::Error> for CustomError {
|
||||
fn from(value: toml::ser::Error) -> Self {
|
||||
CustomError::TomlSerialize(value)
|
||||
|
||||
Reference in New Issue
Block a user