[−][src]Struct hbbft::queueing_honey_badger::QueueingHoneyBadgerBuilder
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]
T: Contribution + Serialize + DeserializeOwned + Clone,
N: NodeIdT + Serialize + DeserializeOwned,
Q: TransactionQueue<T>,
Standard: Distribution<N>,
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]
self,
rng: &mut R
) -> Result<(QueueingHoneyBadger<T, N, Q>, Step<T, N>)>
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]
self,
txs: TI,
rng: &mut R
) -> Result<(QueueingHoneyBadger<T, N, Q>, Step<T, N>)> where
TI: IntoIterator<Item = T>,
R: Rng,
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,
Q: Send,
impl<T, N, Q> Sync for QueueingHoneyBadgerBuilder<T, N, Q> where
Q: Sync,
Q: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom 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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,