Struct raft::Unstable [−][src]
pub struct Unstable { pub snapshot: Option<Snapshot>, pub entries: Vec<Entry>, pub offset: u64, pub tag: String, }
Fields
snapshot: Option<Snapshot>
entries: Vec<Entry>
offset: u64
tag: String
Methods
impl Unstable
[src]
impl Unstable
pub fn new(offset: u64, tag: String) -> Unstable
[src]
pub fn new(offset: u64, tag: String) -> Unstable
pub fn maybe_first_index(&self) -> Option<u64>
[src]
pub fn maybe_first_index(&self) -> Option<u64>
pub fn maybe_last_index(&self) -> Option<u64>
[src]
pub fn maybe_last_index(&self) -> Option<u64>
pub fn maybe_term(&self, idx: u64) -> Option<u64>
[src]
pub fn maybe_term(&self, idx: u64) -> Option<u64>
pub fn stable_to(&mut self, idx: u64, term: u64)
[src]
pub fn stable_to(&mut self, idx: u64, term: u64)
pub fn stable_snap_to(&mut self, idx: u64)
[src]
pub fn stable_snap_to(&mut self, idx: u64)
pub fn restore(&mut self, snap: Snapshot)
[src]
pub fn restore(&mut self, snap: Snapshot)
pub fn truncate_and_append(&mut self, ents: &[Entry])
[src]
pub fn truncate_and_append(&mut self, ents: &[Entry])
pub fn slice(&self, lo: u64, hi: u64) -> &[Entry]
[src]
pub fn slice(&self, lo: u64, hi: u64) -> &[Entry]
pub fn must_check_outofbounds(&self, lo: u64, hi: u64)
[src]
pub fn must_check_outofbounds(&self, lo: u64, hi: u64)
Trait Implementations
impl Debug for Unstable
[src]
impl Debug for Unstable
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Unstable
[src]
impl PartialEq for Unstable
fn eq(&self, other: &Unstable) -> bool
[src]
fn eq(&self, other: &Unstable) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Unstable) -> bool
[src]
fn ne(&self, other: &Unstable) -> bool
This method tests for !=
.
impl Default for Unstable
[src]
impl Default for Unstable