mirror of https://github.com/terhechte/postsack
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.
13 lines
325 B
Rust
13 lines
325 B
Rust
3 years ago
|
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>>;
|
||
|
}
|