[−][src]Struct exonum::blockchain::config::ConsensusConfigBuilder
Builder for ConsensusConfig
.
Initially, ConsensusConfig
in this builder is generated via ConsensusConfig::default()
.
Only the necessary fields can be updated before obtaining the build config via build
method.
Examples
let consensus_config = ConsensusConfigBuilder::new() .first_round_timeout(3010) .min_propose_timeout(20) .build(); assert_eq!(consensus_config.first_round_timeout, 3010); assert_eq!(consensus_config.min_propose_timeout, 20); assert_eq!(consensus_config.status_timeout, ConsensusConfig::default().status_timeout);
Methods
impl ConsensusConfigBuilder
[src]
pub fn new() -> Self
[src]
Creates a new ConsensusConfigBuilder
with ConsensusConfig
initialized to its default value.
pub fn build(self) -> ConsensusConfig
[src]
Finishes the building process, returning the ConsensusConfig
object.
pub fn validator_keys(self, validator_keys: Vec<ValidatorKeys>) -> Self
[src]
Sets the validator_keys
field of ConsensusConfig
.
pub fn first_round_timeout(self, first_round_timeout: Milliseconds) -> Self
[src]
Sets the first_round_timeout
field of ConsensusConfig
.
pub fn status_timeout(self, status_timeout: Milliseconds) -> Self
[src]
Sets the status_timeout
field of ConsensusConfig
.
pub fn peers_timeout(self, peers_timeout: Milliseconds) -> Self
[src]
Sets the peers_timeout
field of ConsensusConfig
.
pub fn txs_block_limit(self, txs_block_limit: u32) -> Self
[src]
Sets the txs_block_limit
field of ConsensusConfig
.
pub fn min_propose_timeout(self, min_propose_timeout: Milliseconds) -> Self
[src]
Sets the min_propose_timeout
field of ConsensusConfig
.
pub fn max_propose_timeout(self, max_propose_timeout: Milliseconds) -> Self
[src]
Sets the max_propose_timeout
field of ConsensusConfig
.
pub fn max_message_len(self, max_message_len: u32) -> Self
[src]
Sets the max_message_len
field of ConsensusConfig
.
pub fn propose_timeout_threshold(self, propose_timeout_threshold: u32) -> Self
[src]
Sets the propose_timeout_threshold
field of ConsensusConfig
.
Trait Implementations
impl Debug for ConsensusConfigBuilder
[src]
impl Default for ConsensusConfigBuilder
[src]
fn default() -> ConsensusConfigBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for ConsensusConfigBuilder
impl Send for ConsensusConfigBuilder
impl Sync for ConsensusConfigBuilder
impl Unpin for ConsensusConfigBuilder
impl UnwindSafe for ConsensusConfigBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> From<T> for T
[src]
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,