use crate::MailboxItem;
use async_trait::async_trait;
use chrono::DateTime;
use chrono::Utc;
use color_eyre::eyre::Result;
use serde::Deserialize;
use serde::Serialize;
#[async_trait]
pub trait Mailbox<ITEM: MailboxItem + Sized>: Send + Sync + std::fmt::Debug {
async fn ensure_storage_exists(&mut self) -> Result<()>;
async fn send(&self, id: &str, item: ITEM) -> Result<String>;
async fn receive(&self, id: &str) -> Result<Option<(String, ITEM)>>;
async fn acknowledge(&self, id: &str, item_id: &str) -> Result<()>;
}