Files
handmade-revolt-backend/crates/quark/src/traits/safety/snapshot.rs
2023-05-21 15:36:36 +01:00

12 lines
351 B
Rust

use crate::models::Snapshot;
use crate::Result;
#[async_trait]
pub trait AbstractSnapshot: Sync + Send {
/// Insert a new snapshot into the database
async fn insert_snapshot(&self, snapshot: &Snapshot) -> Result<()>;
/// Fetch a snapshots by a report's id
async fn fetch_snapshots(&self, report_id: &str) -> Result<Vec<Snapshot>>;
}