pub trait Config<S: Scheme>:
Clone
+ 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. Honest participants with the same
configuration and participant set must select the same leader for each round.
This is stronger than returning the same output for identical inputs because
honest participants may call Elector::elect with different certificates for
the same round. See Elector for the certificate handling requirements.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".