Struct KeyspaceBuilder

Source
pub struct KeyspaceBuilder<N: KeyspaceNode, H: BuildHasher = RapidBuildHasher>(/* private fields */);
Expand description

Keyspace builder.

Implementations§

Source§

impl<N: KeyspaceNode> KeyspaceBuilder<N>

Source

pub fn new<I: IntoIterator<Item = N>>(init_nodes: I) -> Self

Create new keyspace builder.

Source§

impl<N: KeyspaceNode, H: BuildHasher> KeyspaceBuilder<N, H>

Source

pub fn with_build_hasher<I>(init_nodes: I, build_hasher: H) -> Self
where I: IntoIterator<Item = N>,

Create new keyspace builder.

Source

pub fn with_replication_factor<const RF: usize>( self, ) -> KeyspaceBuilderWithReplicationFactor<N, DefaultReplicationStrategy, RF, H>

Transform the builder into one with a different replication factor.

Source

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.

Source

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>

§

impl<N, H> Send for KeyspaceBuilder<N, H>
where H: Send, N: Send,

§

impl<N, H> Sync for KeyspaceBuilder<N, H>
where H: Sync, N: Sync,

§

impl<N, H> Unpin for KeyspaceBuilder<N, H>
where H: Unpin, N: Unpin,

§

impl<N, H> UnwindSafe for KeyspaceBuilder<N, H>
where H: UnwindSafe, N: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.