blob: 0dfe347f7457d2a484d17c72215025d4aa6cfa38 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
use std::error::Error;
pub trait FileStore {
type Err: Clone + Send + Error;
fn is_stored(
&self,
name: &str,
) -> impl std::future::Future<Output = Result<bool, Self::Err>> + std::marker::Send;
fn store(
&self,
name: &str,
data: &[u8],
) -> impl std::future::Future<Output = Result<(), Self::Err>> + std::marker::Send;
fn delete(
&self,
name: &str,
) -> impl std::future::Future<Output = Result<(), Self::Err>> + std::marker::Send;
}
|