parent
e125d79a6c
commit
418ba26da9
@ -0,0 +1,30 @@ |
||||
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()) |
||||
} |
||||
} |
Loading…
Reference in new issue