aerogramme/src/storage/in_memory.rs

52 lines
1 KiB
Rust
Raw Normal View History

2023-11-02 09:45:41 +00:00
use futures::FutureExt;
2023-11-01 14:15:57 +00:00
use crate::storage::*;
2023-11-02 09:38:47 +00:00
#[derive(Clone, Debug)]
2023-11-01 14:15:57 +00:00
pub struct MemCreds {}
pub struct MemStore {}
pub struct MemRef {}
pub struct MemValue {}
2023-11-02 08:57:58 +00:00
impl IRowBuilder for MemCreds {
2023-11-02 09:38:47 +00:00
fn row_store(&self) -> RowStore {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
}
2023-11-02 08:57:58 +00:00
impl IRowStore for MemStore {
2023-11-02 09:38:47 +00:00
fn new_row(&self, partition: &str, sort: &str) -> RowRef {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
}
2023-11-02 08:57:58 +00:00
impl IRowRef for MemRef {
2023-11-02 09:38:47 +00:00
fn set_value(&self, content: Vec<u8>) -> RowValue {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn fetch(&self) -> AsyncResult<RowValue> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn rm(&self) -> AsyncResult<()> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn poll(&self) -> AsyncResult<Option<RowValue>> {
2023-11-02 09:45:41 +00:00
async {
Ok(None)
}.boxed()
2023-11-01 14:15:57 +00:00
}
}
2023-11-02 08:57:58 +00:00
impl IRowValue for MemValue {
2023-11-02 09:38:47 +00:00
fn to_ref(&self) -> RowRef {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
fn content(&self) -> ConcurrentValues {
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn push(&self) -> AsyncResult<()> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
}