[][src]Struct hbbft::queueing_honey_badger::QueueingHoneyBadgerBuilder

pub struct QueueingHoneyBadgerBuilder<T, N, Q> where
    T: Contribution + Serialize + DeserializeOwned + Clone,
    N: NodeIdT + Serialize + DeserializeOwned
{ /* fields omitted */ }

A Queueing Honey Badger builder, to configure the parameters and create new instances of QueueingHoneyBadger.

Methods

impl<T, N, Q> QueueingHoneyBadgerBuilder<T, N, Q> where
    T: Contribution + Serialize + DeserializeOwned + Clone,
    N: NodeIdT + Serialize + DeserializeOwned,
    Q: TransactionQueue<T>,
    Standard: Distribution<N>, 
[src]

pub fn new(dyn_hb: DynamicHoneyBadger<Vec<T>, N>) -> Self[src]

Returns a new QueueingHoneyBadgerBuilder wrapping the given instance of DynamicHoneyBadger.

pub fn step(self, step: DhbStep<Vec<T>, N>) -> Self[src]

Sets the initial step of the DynamicHoneyBadger instance.

pub fn batch_size(self, batch_size: usize) -> Self[src]

Sets the target number of transactions per batch.

pub fn queue(self, queue: Q) -> Self[src]

Sets the transaction queue object.

pub fn build<R: Rng>(
    self,
    rng: &mut R
) -> Result<(QueueingHoneyBadger<T, N, Q>, Step<T, N>)>
[src]

Creates a new Queueing Honey Badger instance with an empty buffer.

pub fn build_with_transactions<TI, R>(
    self,
    txs: TI,
    rng: &mut R
) -> Result<(QueueingHoneyBadger<T, N, Q>, Step<T, N>)> where
    TI: IntoIterator<Item = T>,
    R: Rng
[src]

Returns a new Queueing Honey Badger instance that starts with the given transactions in its buffer.

Auto Trait Implementations

impl<T, N, Q> Send for QueueingHoneyBadgerBuilder<T, N, Q> where
    Q: Send

impl<T, N, Q> Sync for QueueingHoneyBadgerBuilder<T, N, Q> where
    Q: Sync

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.