diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-17 15:02:43 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-11-17 15:02:43 +0100 |
commit | e92dc35564e91ce4e6a8defa9e8b52eef9e55fae (patch) | |
tree | bf33563e7858c5b8b6865c89558b2e0d305b3dec /src/storage/mod.rs | |
parent | 4a33ac2265dae0e8fd1f7fbaec54ab7120334cbe (diff) | |
download | aerogramme-e92dc35564e91ce4e6a8defa9e8b52eef9e55fae.tar.gz aerogramme-e92dc35564e91ce4e6a8defa9e8b52eef9e55fae.zip |
fix orphan storage compatibility
Diffstat (limited to 'src/storage/mod.rs')
-rw-r--r-- | src/storage/mod.rs | 3 |
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>; |