aboutsummaryrefslogtreecommitdiff
path: root/src/storage/mod.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-11-17 15:02:43 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-11-17 15:02:43 +0100
commite92dc35564e91ce4e6a8defa9e8b52eef9e55fae (patch)
treebf33563e7858c5b8b6865c89558b2e0d305b3dec /src/storage/mod.rs
parent4a33ac2265dae0e8fd1f7fbaec54ab7120334cbe (diff)
downloadaerogramme-e92dc35564e91ce4e6a8defa9e8b52eef9e55fae.tar.gz
aerogramme-e92dc35564e91ce4e6a8defa9e8b52eef9e55fae.zip
fix orphan storage compatibility
Diffstat (limited to 'src/storage/mod.rs')
-rw-r--r--src/storage/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index 08ccfec..86d7fa2 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -36,6 +36,7 @@ pub enum Selector<'a> {
pub enum StorageError {
NotFound,
Internal,
+ IncompatibleOrphan,
}
impl std::fmt::Display for StorageError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
@@ -87,7 +88,7 @@ pub trait IRowStore
fn row(&self, partition: &str, sort: &str) -> RowRef;
fn select(&self, selector: Selector) -> AsyncResult<Vec<RowValue>>;
fn rm(&self, selector: Selector) -> AsyncResult<()>;
- fn from_orphan(&self, orphan: OrphanRowRef) -> RowRef;
+ fn from_orphan(&self, orphan: OrphanRowRef) -> Result<RowRef, StorageError>;
}
pub type RowStore = Box<dyn IRowStore + Sync + Send>;