#[repr(C)]pub struct PrepareOkHeader {Show 19 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 parent: u128,
pub prepare_checksum: u128,
pub op: u64,
pub commit: u64,
pub timestamp: u64,
pub request: u64,
pub operation: Operation,
pub operation_padding: [u8; 7],
pub group: u64,
pub reserved: [u8; 48],
}Expand description
Replica -> primary: acknowledge a Prepare.
Fields§
§checksum: u128§checksum_body: u128§cluster: u128§size: u32§view: u32§release: u32§command: Command§replica: u8§reserved_frame: [u8; 66]§parent: u128§prepare_checksum: u128§op: u64§commit: u64§timestamp: u64§request: u64§operation: Operation§operation_padding: [u8; 7]§group: u64§reserved: [u8; 48]Trait Implementations§
Source§impl CheckedBitPattern for PrepareOkHeader
impl CheckedBitPattern for PrepareOkHeader
Source§type Bits = PrepareOkHeaderBits
type Bits = PrepareOkHeaderBits
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: &PrepareOkHeaderBits) -> bool
fn is_valid_bit_pattern(bits: &PrepareOkHeaderBits) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl Clone for PrepareOkHeader
impl Clone for PrepareOkHeader
Source§fn clone(&self) -> PrepareOkHeader
fn clone(&self) -> PrepareOkHeader
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 PrepareOkHeader
impl ConsensusHeader for PrepareOkHeader
Source§const OPERATION_OFFSET: Option<usize>
const OPERATION_OFFSET: Option<usize>
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::PrepareOk
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§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 PrepareOkHeader
Source§impl Debug for PrepareOkHeader
impl Debug for PrepareOkHeader
Source§impl Default for PrepareOkHeader
impl Default for PrepareOkHeader
impl NoUninit for PrepareOkHeader
Auto Trait Implementations§
impl Freeze for PrepareOkHeader
impl RefUnwindSafe for PrepareOkHeader
impl Send for PrepareOkHeader
impl Sync for PrepareOkHeader
impl Unpin for PrepareOkHeader
impl UnsafeUnpin for PrepareOkHeader
impl UnwindSafe for PrepareOkHeader
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