Trait raft_proto::ConfChangeI
source · pub trait ConfChangeI {
// Required methods
fn into_v2(self) -> ConfChangeV2;
fn as_v2(&self) -> Cow<'_, ConfChangeV2>;
fn as_v1(&self) -> Option<&ConfChange>;
}
Expand description
Abstracts over ConfChangeV2 and (legacy) ConfChange to allow treating them in a unified manner.
Required Methods§
sourcefn into_v2(self) -> ConfChangeV2
fn into_v2(self) -> ConfChangeV2
Converts conf change to ConfChangeV2
.
sourcefn as_v2(&self) -> Cow<'_, ConfChangeV2>
fn as_v2(&self) -> Cow<'_, ConfChangeV2>
Gets conf change as ConfChangeV2
.
sourcefn as_v1(&self) -> Option<&ConfChange>
fn as_v1(&self) -> Option<&ConfChange>
Converts conf change to ConfChange
.
ConfChangeV2
can’t be changed back to ConfChange
.