pub trait ReplicationStrategy {
// Required methods
fn is_eligible_replica<N: KeyspaceNode>(
&mut self,
node: &NodeRef<N>,
) -> bool;
fn clone(&self) -> Self;
}Expand description
Replication strategy determines how to choose the nodes for redundancy.
Each instance of ReplicationStrategy is assumed to operate on a single
shard of the keyspace, i.e. a single replica set of nodes.
Required Methods§
Sourcefn is_eligible_replica<N: KeyspaceNode>(&mut self, node: &NodeRef<N>) -> bool
fn is_eligible_replica<N: KeyspaceNode>(&mut self, node: &NodeRef<N>) -> bool
Checks if the given node is eligible for inclusion into a replica set.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.