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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Deserializes using the given deserializer
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Gets the layout of the type.
The type for metadata in pointers and references to Self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more