Struct indy_vdr::pool::PoolBuilder
source · pub struct PoolBuilder {
pub config: PoolConfig,
/* private fields */
}
Expand description
A utility class for building a new pool instance or runner.
Fields§
§config: PoolConfig
Implementations§
source§impl PoolBuilder
impl PoolBuilder
sourcepub fn new(config: PoolConfig, transactions: PoolTransactions) -> Self
pub fn new(config: PoolConfig, transactions: PoolTransactions) -> Self
Create a new PoolBuilder
instance.
sourcepub fn node_weights(self, node_weights: Option<HashMap<String, f32>>) -> Self
pub fn node_weights(self, node_weights: Option<HashMap<String, f32>>) -> Self
Set the node weights associated with the builder.
sourcepub fn into_local(self) -> VdrResult<LocalPool>
pub fn into_local(self) -> VdrResult<LocalPool>
Create a LocalPool
instance from the builder, for use in a single thread.
Create a SharedPool
instance from the builder, for use across multiple threads.
sourcepub fn into_runner(
self,
cache: Option<Cache<String, (String, RequestResultMeta)>>
) -> VdrResult<PoolRunner>
pub fn into_runner( self, cache: Option<Cache<String, (String, RequestResultMeta)>> ) -> VdrResult<PoolRunner>
Create a PoolRunner
instance from the builder, to handle pool interaction
in a dedicated thread.
Trait Implementations§
source§impl Clone for PoolBuilder
impl Clone for PoolBuilder
source§fn clone(&self) -> PoolBuilder
fn clone(&self) -> PoolBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for PoolBuilder
impl RefUnwindSafe for PoolBuilder
impl Send for PoolBuilder
impl Sync for PoolBuilder
impl Unpin for PoolBuilder
impl UnwindSafe for PoolBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more