Trait commitlog::message::MessageSet
[−]
[src]
pub trait MessageSet { fn bytes(&self) -> &[u8]; fn iter(&self) -> MessageIter { ... } fn len(&self) -> usize { ... } fn is_empty(&self) -> bool { ... } fn verify_hashes(&self) -> Result<(), usize> { ... } }
Serialized log message set.
The bytes must be serialized in the format defined by Message
.
Required Methods
Provided Methods
fn iter(&self) -> MessageIter
Iterator on the messages in the message set.
fn len(&self) -> usize
Number of messages in the message set.
fn is_empty(&self) -> bool
Indicator of whether there are messages within the MessageSet
.
fn verify_hashes(&self) -> Result<(), usize>
Verifies the hashes of all the messages, returning the index of a corrupt message when found.
Implementors
impl MessageSet for MessageBuf