pub trait LedgerCodec {
type Error;
// Required methods
fn encode(&self, ledger: &AllocationLedger) -> Result<Vec<u8>, Self::Error>;
fn decode(&self, bytes: &[u8]) -> Result<AllocationLedger, Self::Error>;
}Expand description
LedgerCodec
Integration-supplied encoding for persisted allocation ledgers.
Decoding returns an untrusted durable DTO. Callers should recover ledgers
through LedgerCommitStore, which checks physical/logical generation,
compatibility, and committed ledger integrity before returning authoritative
state.