Trait openraft::storage::RaftLogReaderExt
source · pub trait RaftLogReaderExt<C>: RaftLogReader<C> + Sendwhere
C: RaftTypeConfig,{
// Provided methods
fn try_get_log_entry(
&mut self,
log_index: u64
) -> impl Future<Output = Result<Option<C::Entry>, StorageError<C::NodeId>>> + Send { ... }
fn get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend + OptionalSync>(
&mut self,
range: RB
) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send { ... }
fn get_log_id(
&mut self,
log_index: u64
) -> impl Future<Output = Result<LogId<C::NodeId>, StorageError<C::NodeId>>> + Send { ... }
}
Provided Methods§
sourcefn try_get_log_entry(
&mut self,
log_index: u64
) -> impl Future<Output = Result<Option<C::Entry>, StorageError<C::NodeId>>> + Send
fn try_get_log_entry( &mut self, log_index: u64 ) -> impl Future<Output = Result<Option<C::Entry>, StorageError<C::NodeId>>> + Send
Try to get an log entry.
It does not return an error if the log entry at log_index
is not found.
sourcefn get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend + OptionalSync>(
&mut self,
range: RB
) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send
fn get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend + OptionalSync>( &mut self, range: RB ) -> impl Future<Output = Result<Vec<C::Entry>, StorageError<C::NodeId>>> + Send
Get a series of log entries from storage.
Similar to try_get_log_entries
except an error will be returned if there is an entry not
found in the specified range.
sourcefn get_log_id(
&mut self,
log_index: u64
) -> impl Future<Output = Result<LogId<C::NodeId>, StorageError<C::NodeId>>> + Send
fn get_log_id( &mut self, log_index: u64 ) -> impl Future<Output = Result<LogId<C::NodeId>, StorageError<C::NodeId>>> + Send
Get the log id of the entry at index
.
Object Safety§
This trait is not object safe.