-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Update db_user_value.rs * Update query_result.rs * Update db_user_value_test.rs * Update lib.rs
- Loading branch information
1 parent
517dda7
commit 635c010
Showing
4 changed files
with
131 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
use crate::DbElement; | ||
use crate::DbError; | ||
use crate::DbId; | ||
use crate::DbKey; | ||
use crate::DbKeyValue; | ||
|
||
pub trait DbUserValue: Sized { | ||
fn db_id(&self) -> Option<DbId>; | ||
fn db_keys() -> Vec<DbKey>; | ||
fn from_db_values(values: &[DbKeyValue]) -> Result<Self, DbError>; | ||
fn from_db_element(element: &DbElement) -> Result<Self, DbError>; | ||
fn to_db_values(&self) -> Vec<DbKeyValue>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters