use crate::log::entry::Entry;
pub trait OpDoc {
fn get_key(&self) -> &str;
fn get_value(&self) -> &[u8];
}
pub trait Operation {
fn get_key(&self) -> Option<&String>;
fn get_operation(&self) -> &str;
fn get_value(&self) -> &[u8];
fn get_entry(&self) -> &Entry;
fn get_docs(&self) -> Vec<Box<dyn OpDoc>>;
fn marshal(&self) -> Result<Vec<u8>, Box<dyn std::error::Error>>;
}