[−][src]Trait lol_core::storage::RaftStorage
The abstraction for the backing storage. Conceptually it is considered as a sequence of log entries and the recent vote.
Required methods
#[must_use]pub fn delete_before<'life0, 'async_trait>(
&'life0 self,
r: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
r: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Delete range ..r
#[must_use]pub fn insert_snapshot<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Save the snapshot entry so snapshot index always advance.
#[must_use]pub fn insert_entry<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn get_entry<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn get_snapshot_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn get_last_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn save_ballot<'life0, 'async_trait>(
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn load_ballot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn put_tag<'life0, 'async_trait>(
&'life0 self,
i: Index,
snapshot: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
snapshot: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn delete_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn get_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
#[must_use]pub fn list_tags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Implementors
impl RaftStorage for lol_core::storage::disk::Storage
[src]
This is supported on crate feature
persistency
only.pub fn list_tags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn delete_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn put_tag<'life0, 'async_trait>(
&'life0 self,
i: Index,
x: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
x: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn delete_before<'life0, 'async_trait>(
&'life0 self,
r: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
r: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_last_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn insert_snapshot<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn insert_entry<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_entry<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_snapshot_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn save_ballot<'life0, 'async_trait>(
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn load_ballot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
impl RaftStorage for lol_core::storage::memory::Storage
[src]
pub fn delete_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn list_tags<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BTreeSet<Index>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_tag<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<SnapshotTag>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn put_tag<'life0, 'async_trait>(
&'life0 self,
i: Index,
x: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
x: SnapshotTag
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_last_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn delete_before<'life0, 'async_trait>(
&'life0 self,
r: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
r: u64
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn insert_snapshot<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn insert_entry<'life0, 'async_trait>(
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index,
e: Entry
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_entry<'life0, 'async_trait>(
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
i: Index
) -> Pin<Box<dyn Future<Output = Result<Option<Entry>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn get_snapshot_index<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Index>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn save_ballot<'life0, 'async_trait>(
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self,
v: Ballot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
pub fn load_ballot<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Ballot>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,