[][src]Enum actix_raft::messages::ResponseMode

pub enum ResponseMode {
    Committed,
    Applied,
}

The desired response mode for a client request.

This value specifies when a client request desires to receive its response from Raft. When Comitted is chosen, the client request will receive a response after the request has been successfully replicated to at least half of the nodes in the cluster. This is what the Raft protocol refers to as being comitted.

When Applied is chosen, the client request will receive a response after the request has been successfully committed and successfully applied to the state machine.

The choice between these two options depends on the requirements related to the request. If the data of the client request payload will need to be read immediately after the response is received, then Applied must be used. If there is no requirement that the data must be immediately read after receiving a response, then Committed may be used to speed up response times.

Variants

Committed

A response will be returned after the request has been committed to the cluster.

Applied

A response will be returned after the request has been applied to the leader's state machine.

Trait Implementations

impl Debug for ResponseMode[src]

impl<'de> Deserialize<'de> for ResponseMode[src]

impl Serialize for ResponseMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,