pub enum Consistency {
None,
One,
Two,
Three,
Quorum,
LocalQuorum,
All,
EachQuorum,
}Expand description
The consistency level which should be reached before a write can be returned as successful.
If the consistency level is not met then an error should be returned, but this does not mean that the operation has failed to go through on all nodes, it simply means that the target number of replicas has not been reached.
Variants§
None
No other replicas will have the operation broadcast to them.
One
Broadcast the change to one replica as determined by the NodeSelector.
Two
Broadcast the change to two replicas as determined by the NodeSelector.
Three
Broadcast the change to three replicas as determined by the NodeSelector.
Quorum
A simple majority of all replicas across all data centers.
The nodes selected are determined by the node selector, this is designed to be a hint to the node selector rather than a fixed rule.
LocalQuorum
A simple majority of in the local data center.
The nodes selected are determined by the node selector, this is designed to be a hint to the node selector rather than a fixed rule.
All
The change is broadcast to all nodes as part of the cluster.
EachQuorum
A simple majority in each data center.
If no data center is provided to any nodes when they’re created, this is the same as Consistency::Quorum.
The nodes selected are determined by the node selector, this is designed to be a hint to the node selector rather than a fixed rule.
Trait Implementations§
Source§impl Clone for Consistency
impl Clone for Consistency
Source§fn clone(&self) -> Consistency
fn clone(&self) -> Consistency
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Consistency
impl Debug for Consistency
Source§impl Hash for Consistency
impl Hash for Consistency
Source§impl PartialEq for Consistency
impl PartialEq for Consistency
impl Copy for Consistency
impl Eq for Consistency
impl StructuralPartialEq for Consistency
Auto Trait Implementations§
impl Freeze for Consistency
impl RefUnwindSafe for Consistency
impl Send for Consistency
impl Sync for Consistency
impl Unpin for Consistency
impl UnwindSafe for Consistency
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.