Enum raft::ReadOnlyOption
source · pub enum ReadOnlyOption {
Safe,
LeaseBased,
}
Expand description
Determines the relative safety of and consistency of read only requests.
Variants§
Safe
Safe guarantees the linearizability of the read only request by communicating with the quorum. It is the default and suggested option.
LeaseBased
LeaseBased ensures linearizability of the read only request by relying on the leader lease. It can be affected by clock drift. If the clock drift is unbounded, leader might keep the lease longer than it should (clock can move backward/pause without any bound). ReadIndex is not safe in that case.
Trait Implementations§
source§impl Clone for ReadOnlyOption
impl Clone for ReadOnlyOption
source§fn clone(&self) -> ReadOnlyOption
fn clone(&self) -> ReadOnlyOption
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ReadOnlyOption
impl Debug for ReadOnlyOption
source§impl Default for ReadOnlyOption
impl Default for ReadOnlyOption
source§fn default() -> ReadOnlyOption
fn default() -> ReadOnlyOption
Returns the “default value” for a type. Read more
source§impl PartialEq<ReadOnlyOption> for ReadOnlyOption
impl PartialEq<ReadOnlyOption> for ReadOnlyOption
source§fn eq(&self, other: &ReadOnlyOption) -> bool
fn eq(&self, other: &ReadOnlyOption) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.