pub struct KeyspaceBuilder<N: KeyspaceNode, H: BuildHasher = RapidBuildHasher>(/* private fields */);
Expand description
Keyspace builder.
Implementations§
Source§impl<N: KeyspaceNode> KeyspaceBuilder<N>
impl<N: KeyspaceNode> KeyspaceBuilder<N>
Sourcepub fn new<I: IntoIterator<Item = N>>(init_nodes: I) -> Self
pub fn new<I: IntoIterator<Item = N>>(init_nodes: I) -> Self
Create new keyspace builder.
Source§impl<N: KeyspaceNode, H: BuildHasher> KeyspaceBuilder<N, H>
impl<N: KeyspaceNode, H: BuildHasher> KeyspaceBuilder<N, H>
Sourcepub fn with_build_hasher<I>(init_nodes: I, build_hasher: H) -> Selfwhere
I: IntoIterator<Item = N>,
pub fn with_build_hasher<I>(init_nodes: I, build_hasher: H) -> Selfwhere
I: IntoIterator<Item = N>,
Create new keyspace builder.
Sourcepub fn with_replication_factor<const RF: usize>(
self,
) -> KeyspaceBuilderWithReplicationFactor<N, DefaultReplicationStrategy, RF, H>
pub fn with_replication_factor<const RF: usize>( self, ) -> KeyspaceBuilderWithReplicationFactor<N, DefaultReplicationStrategy, RF, H>
Transform the builder into one with a different replication factor.
Sourcepub fn with_replication_strategy<R: ReplicationStrategy>(
self,
replication_strategy: R,
) -> KeyspaceBuilderWithReplicationStrategy<N, R, 3, H>
pub fn with_replication_strategy<R: ReplicationStrategy>( self, replication_strategy: R, ) -> KeyspaceBuilderWithReplicationStrategy<N, R, 3, H>
Transform the builder into one with a different replication strategy.
Sourcepub fn build(
self,
) -> KeyspaceResult<Keyspace<N, DefaultReplicationStrategy, 3, H>>
pub fn build( self, ) -> KeyspaceResult<Keyspace<N, DefaultReplicationStrategy, 3, H>>
Build the keyspace.
Auto Trait Implementations§
impl<N, H> Freeze for KeyspaceBuilder<N, H>where
H: Freeze,
impl<N, H> RefUnwindSafe for KeyspaceBuilder<N, H>where
H: RefUnwindSafe,
N: RefUnwindSafe,
impl<N, H> Send for KeyspaceBuilder<N, H>
impl<N, H> Sync for KeyspaceBuilder<N, H>
impl<N, H> Unpin for KeyspaceBuilder<N, H>
impl<N, H> UnwindSafe for KeyspaceBuilder<N, H>where
H: UnwindSafe,
N: UnwindSafe,
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