#[repr(C)]pub struct CommitHeader {Show 15 fields
pub checksum: u128,
pub checksum_body: u128,
pub cluster: u128,
pub size: u32,
pub view: u32,
pub release: u32,
pub command: Command,
pub replica: u8,
pub reserved_frame: [u8; 66],
pub commit_checksum: u128,
pub timestamp_monotonic: u64,
pub commit: u64,
pub checkpoint_op: u64,
pub group: u64,
pub reserved: [u8; 80],
}Expand description
Primary -> replicas: commit up to this op. Header-only (no body).
Fields§
§checksum: u128§checksum_body: u128§cluster: u128§size: u32§view: u32§release: u32§command: Command§replica: u8§reserved_frame: [u8; 66]§commit_checksum: u128§timestamp_monotonic: u64§commit: u64§checkpoint_op: u64§group: u64§reserved: [u8; 80]Trait Implementations§
Source§impl CheckedBitPattern for CommitHeader
impl CheckedBitPattern for CommitHeader
Source§type Bits = CommitHeaderBits
type Bits = CommitHeaderBits
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(bits: &CommitHeaderBits) -> bool
fn is_valid_bit_pattern(bits: &CommitHeaderBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl Clone for CommitHeader
impl Clone for CommitHeader
Source§fn clone(&self) -> CommitHeader
fn clone(&self) -> CommitHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ConsensusHeader for CommitHeader
impl ConsensusHeader for CommitHeader
Source§const FRAME_SEALED: bool = true
const FRAME_SEALED: bool = true
Whether this header’s
checksum field seals the frame. Read moreconst COMMAND: Command = Command::Commit
Source§fn set_checksum(&mut self, checksum: u128)
fn set_checksum(&mut self, checksum: u128)
Overwrite the
checksum field.fn operation(&self) -> Operation
fn command(&self) -> Command
fn size(&self) -> u32
Source§const IDENTITY_CHECKSUMMED: bool = false
const IDENTITY_CHECKSUMMED: bool = false
Whether
checksum carries the prepare identity, which covers the
operation byte: an unknown operation on such a frame can be
authenticated from the raw bytes even though the typed view refuses to
cast. False wherever checksum seals the frame or crosses the client
boundary.Source§const OPERATION_OFFSET: Option<usize> = None
const OPERATION_OFFSET: Option<usize> = None
Source§fn accepts(command: Command) -> bool
fn accepts(command: Command) -> bool
Whether a frame carrying
command may be typed as this header.
Defaults to an exact match; a header that serves several commands
with one layout (e.g. RepairDone / RangeEvicted) widens it.Source§fn frame_checksum(&self) -> u128
fn frame_checksum(&self) -> u128
Checksum over every byte of the header past
checksum itself. Read moreSource§fn seal(&mut self)
fn seal(&mut self)
Stamp
Self::frame_checksum. Call last when building a frame: it covers
every other field, checksum_body included, so later writes are uncovered.Source§fn verify_frame(&self) -> Result<(), ConsensusError>
fn verify_frame(&self) -> Result<(), ConsensusError>
Reject a frame whose header does not match its own checksum. Read more
impl Copy for CommitHeader
Source§impl Debug for CommitHeader
impl Debug for CommitHeader
impl NoUninit for CommitHeader
Auto Trait Implementations§
impl Freeze for CommitHeader
impl RefUnwindSafe for CommitHeader
impl Send for CommitHeader
impl Sync for CommitHeader
impl Unpin for CommitHeader
impl UnsafeUnpin for CommitHeader
impl UnwindSafe for CommitHeader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more