feat: Added DiscordConfig for future usage

- Added crate::error::Error::IsNotImplemented
- Added Config::full_impl_path
- Added Config::discord_impl for discord crate
This commit is contained in:
Alexey 2025-12-09 16:07:41 +03:00
commit b92eaa1241
4 changed files with 106 additions and 1 deletions

View file

@ -357,4 +357,19 @@ impl Config {
path.push(self.map.clone());
path
}
/// Returns full path to implementation config TOML, if defined
/// This path will be relative to working directory
/// Only makes sense if using inside binary crate,
/// which provides implementation config
pub fn full_impl_path(&self) -> Option<PathBuf> {
match &self.impl_path {
Some(impl_path) => {
let mut path = self.path.clone();
path.push(impl_path.clone());
Some(path)
},
None => None,
}
}
}