pub struct ConfigurationRecord { /* private fields */ }Expand description
Canonical immutable configuration for three authenticated durable voters.
The record fixes the native wire version and canonical operation schema 1. Endpoint addresses and local tuning are deliberately excluded. Authentication still belongs to the transport adapter: loading this record does not authenticate a peer or authorize a restarted voter to enter normal.
Implementations§
Source§impl ConfigurationRecord
impl ConfigurationRecord
Sourcepub fn new(
group_id: GroupId,
configuration_epoch: u64,
voters: [ConfiguredVoter; 3],
) -> Result<Self, ConfigurationRecordError>
pub fn new( group_id: GroupId, configuration_epoch: u64, voters: [ConfiguredVoter; 3], ) -> Result<Self, ConfigurationRecordError>
Construct a complete fixed configuration and derive its scope digest. Voter IDs and principal fingerprints must be nonzero and pairwise distinct.
Sourcepub const fn configuration(self) -> Configuration
pub const fn configuration(self) -> Configuration
Verified group, ordered voter identities, and complete configuration digest.
Sourcepub const fn voters(&self) -> &[ConfiguredVoter; 3]
pub const fn voters(&self) -> &[ConfiguredVoter; 3]
Ordered voter-to-principal bindings the transport adapter must enforce.
Sourcepub fn encode(self) -> [u8; 256]
pub fn encode(self) -> [u8; 256]
Encode without allocation. All integer fields use network byte order.
Sourcepub fn decode(bytes: &[u8]) -> Result<Self, ConfigurationRecordError>
pub fn decode(bytes: &[u8]) -> Result<Self, ConfigurationRecordError>
Validate exact length, supported versions, canonical fields, and digest. Unknown fields and malformed membership are rejected, never normalized.