openraft 0.10.0-alpha.18

Advanced Raft consensus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::RaftTypeConfig;
use crate::type_config::alias::LogIdOf;

/// The follower's log does not match the leader's at the given index.
///
/// The follower rejects an `AppendEntries` request because `prev_log_id` from the
/// leader is not present in its local log.
#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize), serde(bound = ""))]
#[error("conflicting log-id: local={local:?} should be: {expect:?}")]
pub struct ConflictingLogId<C: RaftTypeConfig> {
    pub expect: LogIdOf<C>,
    pub local: Option<LogIdOf<C>>,
}