You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
postsack/core/src/database/database_like.rs

13 lines
325 B
Rust

use eyre::Result;
use std::path::Path;
use super::{query::Query, query_result::QueryResult};
pub trait DatabaseLike: Send + Sync {
fn new(path: impl AsRef<Path>) -> Result<Self>
where
Self: Sized;
fn total_mails(&self) -> Result<usize>;
fn query(&self, query: &Query) -> Result<Vec<QueryResult>>;
}