Struct commitlog::Message
[−]
[src]
pub struct Message<'a> { /* fields omitted */ }
Messages contain finite-sized binary values with an offset from the beginning of the log.
Bytes | Encoding | Value |
---|---|---|
0-7 | Big Endian u64 | Offset |
8-11 | Big Endian u32 | Payload Size |
12-15 | Big Endian u32 | CRC32 (IEEE) |
16+ | Payload |
Methods
impl<'a> Message<'a>
[src]
fn crc(&self) -> u32
IEEE CRC32 of the payload.
fn size(&self) -> u32
Size of the payload.
fn offset(&self) -> Offset
Offset of the message in the log.
fn payload(&self) -> &[u8]
Payload of the message.