put media in filesystem

This commit is contained in:
hamidreza kalbasi 2021-06-04 08:06:12 +04:30 committed by Timo Kösters
parent d0ee823254
commit 972caacdc2
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
6 changed files with 78 additions and 30 deletions

View file

@ -47,7 +47,7 @@ pub trait Tree: Send + Sync {
fn scan_prefix<'a>(
&'a self,
prefix: Vec<u8>,
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>;
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + Send + 'a>;
fn watch_prefix<'a>(&'a self, prefix: &[u8]) -> Pin<Box<dyn Future<Output = ()> + Send + 'a>>;
@ -142,7 +142,7 @@ impl Tree for SledEngineTree {
fn scan_prefix<'a>(
&'a self,
prefix: Vec<u8>,
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + Send + 'a> {
let iter = self
.0
.scan_prefix(prefix)
@ -279,7 +279,7 @@ impl Tree for RocksDbEngineTree<'_> {
fn scan_prefix<'a>(
&'a self,
prefix: Vec<u8>,
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a> {
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + Send + 'a> {
Box::new(
self.db
.0