aboutsummaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage')
-rw-r--r--src/storage/garage.rs2
-rw-r--r--src/storage/in_memory.rs2
-rw-r--r--src/storage/mod.rs3
3 files changed, 4 insertions, 3 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index f458aeb..00962f2 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -36,7 +36,7 @@ impl IRowStore for GrgStore {
unimplemented!();
}
- fn from_orphan(&self, orphan: OrphanRowRef) -> RowRef {
+ fn from_orphan(&self, orphan: OrphanRowRef) -> Result<RowRef, StorageError> {
unimplemented!();
}
}
diff --git a/src/storage/in_memory.rs b/src/storage/in_memory.rs
index 20f96a4..a29b790 100644
--- a/src/storage/in_memory.rs
+++ b/src/storage/in_memory.rs
@@ -37,7 +37,7 @@ impl IRowStore for MemStore {
unimplemented!();
}
- fn from_orphan(&self, orphan: OrphanRowRef) -> RowRef {
+ fn from_orphan(&self, orphan: OrphanRowRef) -> Result<RowRef, StorageError> {
unimplemented!();
}
}
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>;