[−][src]Trait paxakos::LogEntry
Appended to the shared log and applied to the shared State
.
Associated Types
type Id: Identifier
type Reader: Read
Required methods
#[must_use]fn from_reader<'async_trait, R: AsyncRead + Unpin>(
read: R
) -> Pin<Box<dyn Future<Output = Result<Self, BoxError>> + 'async_trait>> where
R: 'async_trait,
Self: 'async_trait,
read: R
) -> Pin<Box<dyn Future<Output = Result<Self, BoxError>> + 'async_trait>> where
R: 'async_trait,
Self: 'async_trait,
Deserializes log entry that was previously serialized using
to_reader()
.
While implementations need not detect arbitrary data corruption, they must not panic.
fn size(&self) -> usize
Number of bytes the result of to_reader()
will emit.
fn to_reader(&self) -> Self::Reader
Serializes the log entry to enable snapshots.
LogEntry::from_reader(e.to_reader())
must yield an equivalent log
entry.
fn id(&self) -> Self::Id
Returns a unique identifier for the log entry.
Identifiers need only be unique within the rough timeframe of them being appended to the distributed log. That notwithstanding it is recommended that UUIDs or some other "universally unique" identifier are used.