pub struct MemLogReader<C: RaftTypeConfig<NodeId = NodeId>> { /* private fields */ }Expand description
A cloneable log reader for the in-memory store.
Trait Implementations§
Source§impl<C: RaftTypeConfig<NodeId = NodeId>> Clone for MemLogReader<C>
impl<C: RaftTypeConfig<NodeId = NodeId>> Clone for MemLogReader<C>
Source§impl<C> RaftLogReader<C> for MemLogReader<C>
impl<C> RaftLogReader<C> for MemLogReader<C>
Source§async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>(
&mut self,
range: RB,
) -> Result<Vec<C::Entry>, StorageError<NodeId>>
async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>( &mut self, range: RB, ) -> Result<Vec<C::Entry>, StorageError<NodeId>>
Get a series of log entries from storage. Read more
Source§fn limited_get_log_entries(
&mut self,
start: u64,
end: u64,
) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn limited_get_log_entries( &mut self, start: u64, end: u64, ) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Returns log entries within range
[start, end), end is exclusive,
potentially limited by implementation-defined constraints. Read moreAuto Trait Implementations§
impl<C> Freeze for MemLogReader<C>
impl<C> !RefUnwindSafe for MemLogReader<C>
impl<C> Send for MemLogReader<C>
impl<C> Sync for MemLogReader<C>
impl<C> Unpin for MemLogReader<C>
impl<C> UnsafeUnpin for MemLogReader<C>
impl<C> !UnwindSafe for MemLogReader<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, LR> RaftLogReaderExt<C> for LRwhere
C: RaftTypeConfig,
LR: RaftLogReader<C>,
impl<C, LR> RaftLogReaderExt<C> for LRwhere
C: RaftTypeConfig,
LR: RaftLogReader<C>,
Source§fn try_get_log_entry(
&mut self,
log_index: u64,
) -> impl Future<Output = Result<Option<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn try_get_log_entry( &mut self, log_index: u64, ) -> impl Future<Output = Result<Option<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Try to get an log entry. Read more
Source§fn get_log_entries<RB>(
&mut self,
range: RB,
) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn get_log_entries<RB>( &mut self, range: RB, ) -> impl Future<Output = Result<Vec<<C as RaftTypeConfig>::Entry>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Get a series of log entries from storage. Read more
Source§fn get_log_id(
&mut self,
log_index: u64,
) -> impl Future<Output = Result<LogId<<C as RaftTypeConfig>::NodeId>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
fn get_log_id( &mut self, log_index: u64, ) -> impl Future<Output = Result<LogId<<C as RaftTypeConfig>::NodeId>, StorageError<<C as RaftTypeConfig>::NodeId>>> + Send
Get the log id of the entry at
index.