use crate::document::DocumentId;
use crate::entry::traits::{AsEncodedEntry, AsEntry};
use crate::entry::LogId;
use crate::identity::Author;
use crate::operation::EncodedOperation;
use crate::schema::SchemaId;
pub trait EntryWithOperation: AsEntry + AsEncodedEntry {
fn payload(&self) -> Option<&EncodedOperation>;
}
pub trait AsStorageLog: Sized + Send + Sync {
fn new(author: &Author, schema: &SchemaId, document: &DocumentId, log_id: &LogId) -> Self;
fn id(&self) -> LogId;
fn author(&self) -> Author;
fn document_id(&self) -> DocumentId;
fn schema_id(&self) -> SchemaId;
}