|
|
@ -25,12 +25,6 @@ pub enum SyncError { |
|
|
|
Unexpected(#[from] unexpected::Error), |
|
|
|
Unexpected(#[from] unexpected::Error), |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#[derive(thiserror::Error, Clone, Debug, PartialEq)] |
|
|
|
|
|
|
|
pub enum AllDescrsError { |
|
|
|
|
|
|
|
#[error(transparent)] |
|
|
|
|
|
|
|
Unexpected(#[from] unexpected::Error), |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(thiserror::Error, Debug)] |
|
|
|
#[derive(thiserror::Error, Debug)] |
|
|
|
pub enum GetFileError { |
|
|
|
pub enum GetFileError { |
|
|
|
#[error("descr not synced")] |
|
|
|
#[error("descr not synced")] |
|
|
@ -52,7 +46,5 @@ pub trait Store { |
|
|
|
/// the origin into the storage.
|
|
|
|
/// the origin into the storage.
|
|
|
|
fn sync(&self, descr: &Descr) -> util::BoxFuture<'_, Result<(), SyncError>>; |
|
|
|
fn sync(&self, descr: &Descr) -> util::BoxFuture<'_, Result<(), SyncError>>; |
|
|
|
|
|
|
|
|
|
|
|
fn all_descrs(&self) -> Result<Vec<Descr>, AllDescrsError>; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fn get_file(&self, descr: &Descr, path: &str) -> Result<util::BoxByteStream, GetFileError>; |
|
|
|
fn get_file(&self, descr: &Descr, path: &str) -> Result<util::BoxByteStream, GetFileError>; |
|
|
|
} |
|
|
|
} |
|
|
|