use std::path::PathBuf;
#[derive(thiserror::Error, Debug)]
pub enum MemoryError {
#[error("io error reading {path}: {source}")]
Io {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("failed to initialise auto-memory dir {path}: {source}")]
AutoMemorySeed {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("invalid topic frontmatter at {path}: {reason}")]
InvalidTopic {
path: PathBuf,
reason: String,
},
#[error("invalid topic slug '{slug}': {reason}")]
InvalidSlug {
slug: String,
reason: String,
},
}
pub type Result<T> = std::result::Result<T, MemoryError>;