Adds some more info on the scenario

This commit is contained in:
Dandaedre 2025-02-17 19:36:55 +01:00
parent 862021e0b2
commit bfe9285b43
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
2 changed files with 13 additions and 0 deletions

View File

@ -156,6 +156,11 @@ pub trait DbSerializable {
/// A generic database+connection, handling all the deserialization of the inner types
pub trait RecipeDatabase {
/// Create the database from a file
fn new(origin: &str) -> Result<Self, EquipementError>
where
Self: std::marker::Sized;
/// Serialize a vector of objects of the given type in the specified table of the underlying database
fn serialize_vec_from_table<T>(table: &str) -> std::result::Result<Vec<T>, EquipementError>;

View File

@ -31,6 +31,14 @@ impl RecipeDatabase for DatabaseMock {
let _ = query;
todo!()
}
fn new(origin: &str) -> Result<Self, crate::error::EquipementError>
where
Self: std::marker::Sized,
{
let _ = origin;
todo!()
}
}
/// Mock config
pub struct ConfigMock {}