diff --git a/weaponry/src/database.rs b/weaponry/src/database.rs index ea711da..33e4597 100644 --- a/weaponry/src/database.rs +++ b/weaponry/src/database.rs @@ -33,13 +33,13 @@ impl EquipementDatabase { } impl RecipeDatabase for EquipementDatabase { - fn serialize_vec_from_table( + fn serialize_vec_from_table( table: &str, ) -> Result, crate::error::FatalEquipementError> { todo!() } - fn serialize_vec_from_table_with_query( + fn serialize_vec_from_table_with_query( table: &str, query: &str, ) -> Result, crate::error::FatalEquipementError> { diff --git a/weaponry/src/interfaces.rs b/weaponry/src/interfaces.rs index 1895c6d..b08ecc1 100644 --- a/weaponry/src/interfaces.rs +++ b/weaponry/src/interfaces.rs @@ -7,6 +7,8 @@ use std::{path::Path, rc::Rc}; +use serde::de::DeserializeOwned; + use crate::error::{EquipementError, FatalEquipementError}; /// Trait representing a view table @@ -162,12 +164,12 @@ pub trait RecipeDatabase { 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( + fn serialize_vec_from_table( table: &str, ) -> std::result::Result, FatalEquipementError>; /// Serialize a specified vector of objects of the given type with an additionnal restriction - fn serialize_vec_from_table_with_query( + fn serialize_vec_from_table_with_query( table: &str, query: &str, ) -> std::result::Result, FatalEquipementError>;