restructure into multiple crates

add mcp server collection
This commit is contained in:
milan
2026-04-07 00:06:13 +02:00
parent 2dbac8a91a
commit ee17e74753
21 changed files with 2095 additions and 164 deletions
+16
View File
@@ -0,0 +1,16 @@
use std::path::Path;
use thiserror::Error;
use serde::de::DeserializeOwned;
#[derive(Debug, Error)]
pub enum ConfigLoadingError{
#[error(transparent)]
IoError(#[from] std::io::Error),
#[error(transparent)]
ParseError(#[from] toml::de::Error),
}
pub fn config_from_file<T: DeserializeOwned>(filepath: impl AsRef<Path>) -> Result<T, ConfigLoadingError> {
let toml_string: String = std::fs::read_to_string(filepath)?;
Ok(toml::from_str(&toml_string)?)
}