Created
September 30, 2021 14:48
-
-
Save ntakouris/61a965eb5dc2bcc3fefd69d847092b91 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
pub trait DB: Send + Sync { | |
// fill out your own `Err` types | |
fn save(&self, resource: DataResource) -> Result<(), String>; | |
fn retrieve(&self, id: &String) -> Result<Option<DataResource>, String>; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment