Trait NamedDataCache

Source
pub trait NamedDataCache:
    Sync
    + Send
    + 'static {
Show 19 methods // Required methods fn clone(&self) -> Box<dyn NamedDataCache>; fn insert_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 InsertFileRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 RemoveFileRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn file_update_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 FileUpdateQuickhashRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_file_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_file_by_file_id<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByFileIdRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_files_by_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByQuickHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_files_by_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_dirs_by_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetDirByFileRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileDirRef>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn insert_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 InsertChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn remove_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 RemoveChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn update_chunk_state<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkStateRequest, ) -> Pin<Box<dyn Future<Output = Result<ChunkState, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn update_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkRefsRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn exists_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ExistsChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<ChunkCacheData>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 Vec<GetChunkRequest>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<ChunkCacheData>>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn get_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRefObjectsRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<ChunkObjectRef>, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn select_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 SelectChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<SelectChunkResponse, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn stat<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<NamedDataCacheStat, BuckyError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait;
}

Required Methods§

Source

fn clone(&self) -> Box<dyn NamedDataCache>

Source

fn insert_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 InsertFileRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 RemoveFileRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn file_update_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 FileUpdateQuickhashRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_file_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_file_by_file_id<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByFileIdRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_files_by_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByQuickHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_files_by_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetFileByChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_dirs_by_file<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetDirByFileRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileDirRef>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn insert_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 InsertChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn remove_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 RemoveChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_chunk_state<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkStateRequest, ) -> Pin<Box<dyn Future<Output = Result<ChunkState, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn update_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkRefsRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn exists_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ExistsChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<ChunkCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 Vec<GetChunkRequest>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<ChunkCacheData>>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn get_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRefObjectsRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<ChunkObjectRef>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn select_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 SelectChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<SelectChunkResponse, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn stat<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<NamedDataCacheStat, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Implementations on Foreign Types§

Source§

impl NamedDataCache for MemTracker

Source§

fn clone(&self) -> Box<dyn NamedDataCache>

Source§

fn insert_file<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 InsertFileRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn remove_file<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 RemoveFileRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn file_update_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 FileUpdateQuickhashRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_file_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 GetFileByHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_file_by_file_id<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 GetFileByFileIdRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_files_by_quick_hash<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 GetFileByQuickHashRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_files_by_chunk<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 GetFileByChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_dirs_by_file<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 GetDirByFileRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<FileDirRef>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn insert_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 InsertChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn remove_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 RemoveChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<usize, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn update_chunk_state<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkStateRequest, ) -> Pin<Box<dyn Future<Output = Result<ChunkState, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn update_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 UpdateChunkRefsRequest, ) -> Pin<Box<dyn Future<Output = Result<(), BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn exists_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 ExistsChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<bool>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_chunk<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<Option<ChunkCacheData>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_chunks<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 Vec<GetChunkRequest>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Option<ChunkCacheData>>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn get_chunk_ref_objects<'life0, 'life1, 'async_trait>( &'life0 self, req: &'life1 GetChunkRefObjectsRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<ChunkObjectRef>, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn select_chunk<'life0, 'life1, 'async_trait>( &'life0 self, _req: &'life1 SelectChunkRequest, ) -> Pin<Box<dyn Future<Output = Result<SelectChunkResponse, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemTracker: 'async_trait,

Source§

fn stat<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<NamedDataCacheStat, BuckyError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemTracker: 'async_trait,

Implementors§