pub mod error;
pub mod file;
pub mod in_memory;
#[cfg(feature = "test-utils")]
pub mod test_utils;
pub use error::{BoxError, Result, StoreError};
pub use file::FileStore;
pub use in_memory::InMemoryMessageStore;
use chrono::DateTime;
#[async_trait::async_trait]
pub trait MessageStore: Send + Sync {
async fn add(&mut self, sequence_number: u64, message: &[u8]) -> Result<()>;
async fn get_slice(&self, begin: usize, end: usize) -> Result<Vec<Vec<u8>>>;
fn next_sender_seq_number(&self) -> u64;
fn next_target_seq_number(&self) -> u64;
async fn increment_sender_seq_number(&mut self) -> Result<()>;
async fn increment_target_seq_number(&mut self) -> Result<()>;
async fn set_target_seq_number(&mut self, seq_number: u64) -> Result<()>;
async fn reset(&mut self) -> Result<()>;
fn creation_time(&self) -> DateTime<chrono::Utc>;
}