morethantext-web/src/morethantext/database.rs

31 lines
707 B
Rust

use super::{DBError, ErrorCode, FileData, SessionData, Store};
use std::slice;
#[derive(Clone)]
pub struct Database;
impl FileData<Self> for Database {
fn to_bytes(&self) -> Vec<u8> {
let output = Vec::new();
output
}
fn from_bytes(data: &mut slice::Iter<u8>) -> Result<Self, DBError> {
Ok(Self {})
}
}
impl SessionData for Database {
fn add(&mut self, key: &str, value: &str, data: &str) -> Result<Vec<String>, DBError> {
Ok(Vec::new())
}
fn eq(&self, key: &str, value: &str) -> Result<Vec<String>, DBError> {
Ok(Vec::new())
}
fn list(&self, keys: Vec<&str>) -> Result<Vec<String>, DBError> {
Ok(Vec::new())
}
}