use crate::database::wal::errors::WALError;
pub mod default_wal;
pub mod errors;
#[cfg(test)]
mod tests;
pub const MAGIC_NUMBER: u64 = 0x123232;
pub trait WAL: Send + Sync {
fn append_log(&mut self, payload: &[u8]) -> Result<u64, WALError>;
fn read(&self, offset: u64) -> Result<Box<dyn WALIterator>, WALError>;
fn flush_wal(&mut self, offset: u64) -> Result<(), WALError>;
fn get_offset(&self) -> u64;
}
pub trait WALIterator: Iterator<Item = Result<(u64, Vec<u8>), WALError>> {}