pub struct CommitDurability {
pub ack_policy: ReplicaAckPolicy,
pub ack_timeout: Duration,
}Expand description
Commit durability settings for replicated transactions.
Combines the acknowledgment policy with a timeout for waiting for replica acks.
Fields§
§ack_policy: ReplicaAckPolicyThe replica acknowledgment policy.
ack_timeout: DurationHow long to wait for replica acknowledgments before giving up.
Implementations§
Source§impl CommitDurability
impl CommitDurability
Sourcepub fn new(ack_policy: ReplicaAckPolicy, ack_timeout: Duration) -> Self
pub fn new(ack_policy: ReplicaAckPolicy, ack_timeout: Duration) -> Self
Creates a new CommitDurability with the given policy and timeout.
Sourcepub fn required_acks(&self, electable_count: u32) -> u32
pub fn required_acks(&self, electable_count: u32) -> u32
Returns the number of acknowledgments required for the given number of electable nodes.
Trait Implementations§
Source§impl Clone for CommitDurability
impl Clone for CommitDurability
Source§fn clone(&self) -> CommitDurability
fn clone(&self) -> CommitDurability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CommitDurability
impl Debug for CommitDurability
Source§impl Default for CommitDurability
impl Default for CommitDurability
Source§impl Display for CommitDurability
impl Display for CommitDurability
Source§impl PartialEq for CommitDurability
impl PartialEq for CommitDurability
Source§fn eq(&self, other: &CommitDurability) -> bool
fn eq(&self, other: &CommitDurability) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for CommitDurability
impl Eq for CommitDurability
impl StructuralPartialEq for CommitDurability
Auto Trait Implementations§
impl Freeze for CommitDurability
impl RefUnwindSafe for CommitDurability
impl Send for CommitDurability
impl Sync for CommitDurability
impl Unpin for CommitDurability
impl UnsafeUnpin for CommitDurability
impl UnwindSafe for CommitDurability
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
Mutably borrows from an owned value. Read more
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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>
Converts
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>
Converts
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