pub trait Config<S: Scheme>:
Clone
+ Default
+ Send
+ 'static {
type Elector: Elector<S>;
// Required method
fn build(self, participants: &Set<S::PublicKey>) -> Self::Elector;
}Expand description
Configuration for creating an Elector.
Users create and configure this type, then pass it to the consensus configuration.
Consensus will call build internally with the correct
participant set to create the initialized Elector.
§Determinism Requirement
Implementations must be deterministic: given the same construction parameters
and the same inputs to Elector::elect, the method must always return
the same leader index. This is critical for consensus correctness - all honest
participants must agree on the leader for each round.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.