Files
morethantext-web/src/morethantext/store.rs

32 lines
538 B
Rust
Raw Normal View History

2023-06-22 11:08:40 -04:00
use super::{Data, Database};
use std::collections::HashMap;
2023-06-20 11:51:32 -04:00
#[derive(Clone, Debug)]
2023-06-22 11:08:40 -04:00
pub struct Store {
data: HashMap<String, Data<Database>>,
}
2023-05-30 00:18:13 -04:00
impl Store {
2023-06-03 15:27:26 -04:00
pub fn new() -> Self {
2023-06-22 11:08:40 -04:00
Self {
data: HashMap::new(),
}
2023-05-30 00:18:13 -04:00
}
2023-06-03 15:27:26 -04:00
pub fn list(&self) -> Vec<String> {
2023-05-30 00:18:13 -04:00
Vec::new()
}
}
#[cfg(test)]
mod storage {
use super::*;
#[test]
fn create_new() {
let store = Store::new();
let expected: Vec<String> = Vec::new();
assert_eq!(store.list(), expected);
}
}