#[repr(u16)]pub enum Consistency {
Any = 0,
One = 1,
Two = 2,
Three = 3,
Quorum = 4,
All = 5,
LocalQuorum = 6,
EachQuorum = 7,
LocalOne = 10,
Serial = 8,
LocalSerial = 9,
}
Expand description
A setting that defines a successful write or read by the number of cluster replicas that acknowledge the write or respond to the read request, respectively. See ScyllaDB docs for more detailed description and guidelines.
Variants§
Any = 0
Write-only. Closest replica, as determined by the Snitch, must respond. If all replica nodes are down, write succeeds after a hinted handoff. Provides low latency, guarantees writes never fail.
One = 1
The closest replica as determined by the Snitch must respond. Consistency requirements are not too strict.
Two = 2
The closest two replicas as determined by the Snitch must respond.
Three = 3
The closest three replicas as determined by the Snitch must respond.
Quorum = 4
A simple majority of all replicas across all datacenters must respond. This CL allows for some level of failure.
All = 5
All replicas in the cluster must respond. May cause performance issues.
LocalQuorum = 6
Same as QUORUM, but confined to the same datacenter as the coordinator.
EachQuorum = 7
Write-only. A simple majority in each datacenter must respond.
LocalOne = 10
Same as ONE, but confined to the local datacenter.
Serial = 8
Read-only. Returns results with the most recent data. Including uncommitted in-flight LWTs.
LocalSerial = 9
Read-only. Same as SERIAL, but confined to a local datacenter.
Implementations§
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 Default for Consistency
impl Default for Consistency
Source§fn default() -> Consistency
fn default() -> Consistency
Source§impl Display for Consistency
impl Display for Consistency
Source§impl Ord for Consistency
impl Ord for Consistency
Source§fn cmp(&self, other: &Consistency) -> Ordering
fn cmp(&self, other: &Consistency) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for Consistency
impl PartialEq for Consistency
Source§impl PartialOrd for Consistency
impl PartialOrd for Consistency
Source§impl TryFrom<Consistency> for SerialConsistency
impl TryFrom<Consistency> for SerialConsistency
Source§type Error = NonSerialConsistencyError
type Error = NonSerialConsistencyError
Source§fn try_from(
c: Consistency,
) -> Result<SerialConsistency, <SerialConsistency as TryFrom<Consistency>>::Error>
fn try_from( c: Consistency, ) -> Result<SerialConsistency, <SerialConsistency as TryFrom<Consistency>>::Error>
Source§impl TryFrom<u16> for Consistency
impl TryFrom<u16> for Consistency
Source§type Error = TryFromPrimitiveError<u16>
type Error = TryFromPrimitiveError<u16>
Source§fn try_from(
value: u16,
) -> Result<Consistency, <Consistency as TryFrom<u16>>::Error>
fn try_from( value: u16, ) -> Result<Consistency, <Consistency as TryFrom<u16>>::Error>
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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more