aboutsummaryrefslogtreecommitdiff
path: root/src/storage
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-11-02 12:58:45 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-11-02 12:58:45 +0100
commit1e192f93d5bf544c82fe91fb799d77e8b5d53afe (patch)
treec069a436429cdea4ada253e6187b2b26aa2852e0 /src/storage
parent3b363b2a7803564231e001c215ab427c99c9435b (diff)
downloadaerogramme-1e192f93d5bf544c82fe91fb799d77e8b5d53afe.tar.gz
aerogramme-1e192f93d5bf544c82fe91fb799d77e8b5d53afe.zip
make all our objects send+sync
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.rs10
3 files changed, 7 insertions, 7 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index 6dea00c..595a57c 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -21,7 +21,7 @@ impl IBuilders for GrgCreds {
}
impl IRowStore for GrgStore {
- fn new_row(&self, partition: &str, sort: &str) -> RowRef {
+ fn row(&self, partition: &str, sort: &str) -> RowRef {
unimplemented!();
}
}
diff --git a/src/storage/in_memory.rs b/src/storage/in_memory.rs
index 5cc8ef8..19b55b9 100644
--- a/src/storage/in_memory.rs
+++ b/src/storage/in_memory.rs
@@ -22,7 +22,7 @@ impl IBuilders for FullMem {
}
impl IRowStore for MemStore {
- fn new_row(&self, partition: &str, sort: &str) -> RowRef {
+ fn row(&self, partition: &str, sort: &str) -> RowRef {
unimplemented!();
}
}
diff --git a/src/storage/mod.rs b/src/storage/mod.rs
index 0939463..3e66e84 100644
--- a/src/storage/mod.rs
+++ b/src/storage/mod.rs
@@ -77,7 +77,7 @@ impl Hash for Builders {
// ------ Row
pub trait IRowStore
{
- fn new_row(&self, partition: &str, sort: &str) -> RowRef;
+ fn row(&self, partition: &str, sort: &str) -> RowRef;
}
pub type RowStore = Box<dyn IRowStore + Sync + Send>;
@@ -88,7 +88,7 @@ pub trait IRowRef
fn rm(&self) -> AsyncResult<()>;
fn poll(&self) -> AsyncResult<Option<RowValue>>;
}
-pub type RowRef = Box<dyn IRowRef>;
+pub type RowRef = Box<dyn IRowRef + Send + Sync>;
pub trait IRowValue
{
@@ -96,7 +96,7 @@ pub trait IRowValue
fn content(&self) -> ConcurrentValues;
fn push(&self) -> AsyncResult<()>;
}
-pub type RowValue = Box<dyn IRowValue>;
+pub type RowValue = Box<dyn IRowValue + Send + Sync>;
// ------- Blob
pub trait IBlobStore
@@ -113,10 +113,10 @@ pub trait IBlobRef
fn copy(&self, dst: &BlobRef) -> AsyncResult<()>;
fn rm(&self) -> AsyncResult<()>;
}
-pub type BlobRef = Box<dyn IBlobRef>;
+pub type BlobRef = Box<dyn IBlobRef + Send + Sync>;
pub trait IBlobValue {
fn to_ref(&self) -> BlobRef;
fn push(&self) -> AsyncResult<()>;
}
-pub type BlobValue = Box<dyn IBlobValue>;
+pub type BlobValue = Box<dyn IBlobValue + Send + Sync>;