pub struct Database { /* private fields */ }Implementations§
Source§impl Database
impl Database
pub async fn new(db_path: &Path) -> Result<Self>
pub async fn init(&self) -> Result<()>
pub async fn migrate(&self) -> Result<()>
pub async fn store_computation( &self, computation_type: &str, result: &ComputationResult, ) -> Result<String>
pub async fn list_computations( &self, limit: u32, ) -> Result<Vec<StoredComputation>>
pub async fn get_computation( &self, id: &str, ) -> Result<Option<StoredComputation>>
pub async fn delete_computation(&self, id: &str) -> Result<()>
pub async fn export(&self, path: &Path) -> Result<()>
pub async fn import(&self, path: &Path) -> Result<()>
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnsafeUnpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more