Adds some more info on the scenario
This commit is contained in:
parent
862021e0b2
commit
bfe9285b43
|
|
@ -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>;
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {}
|
||||
|
|
|
|||
Loading…
Reference in New Issue