pub struct FileLogReader<C: RaftTypeConfig> { /* private fields */ }Trait Implementations§
Source§impl<C: Clone + RaftTypeConfig> Clone for FileLogReader<C>
impl<C: Clone + RaftTypeConfig> Clone for FileLogReader<C>
Source§fn clone(&self) -> FileLogReader<C>
fn clone(&self) -> FileLogReader<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C> RaftLogReader<C> for FileLogReader<C>
impl<C> RaftLogReader<C> for FileLogReader<C>
Source§async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>(
&mut self,
range: RB,
) -> Result<Vec<C::Entry>, Error>
async fn try_get_log_entries<RB: RangeBounds<u64> + Clone + Debug + OptionalSend>( &mut self, range: RB, ) -> Result<Vec<C::Entry>, Error>
Get a series of log entries from storage. Read more
Source§async fn read_vote(&mut self) -> Result<Option<C::Vote>, Error>
async fn read_vote(&mut self) -> Result<Option<C::Vote>, Error>
Return the last saved vote by
RaftLogStorage::save_vote. Read moreSource§fn leader_bounded_stream<RB>(
&mut self,
leader: <C as RaftTypeConfig>::LeaderId,
range: RB,
) -> impl Future<Output = impl Stream<Item = Result<<C as RaftTypeConfig>::Entry, LeaderBoundedStreamError<C>>> + OptionalSend> + Send
fn leader_bounded_stream<RB>( &mut self, leader: <C as RaftTypeConfig>::LeaderId, range: RB, ) -> impl Future<Output = impl Stream<Item = Result<<C as RaftTypeConfig>::Entry, LeaderBoundedStreamError<C>>> + OptionalSend> + Send
Read log entries as a stream, conditional on vote state. Read more
Source§fn entries_stream<RB>(
&mut self,
range: RB,
) -> impl Future<Output = impl Stream<Item = Result<<C as RaftTypeConfig>::Entry, Error>> + OptionalSend> + Send
fn entries_stream<RB>( &mut self, range: RB, ) -> impl Future<Output = impl Stream<Item = Result<<C as RaftTypeConfig>::Entry, Error>> + OptionalSend> + Send
Read log entries as a stream without leader validation. Read more
Auto Trait Implementations§
impl<C> Freeze for FileLogReader<C>
impl<C> !RefUnwindSafe for FileLogReader<C>
impl<C> Send for FileLogReader<C>
impl<C> Sync for FileLogReader<C>
impl<C> Unpin for FileLogReader<C>
impl<C> UnsafeUnpin for FileLogReader<C>
impl<C> !UnwindSafe for FileLogReader<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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<C, LR> RaftLogReaderExt<C> for LR
impl<C, LR> RaftLogReaderExt<C> for LR
Source§fn try_get_log_entry(
&mut self,
log_index: u64,
) -> impl Future<Output = Result<Option<<C as RaftTypeConfig>::Entry>, StorageError<C>>> + Send
fn try_get_log_entry( &mut self, log_index: u64, ) -> impl Future<Output = Result<Option<<C as RaftTypeConfig>::Entry>, StorageError<C>>> + Send
Try to get a log entry. Read more
Source§fn get_log_id(
&mut self,
log_index: u64,
) -> impl Future<Output = Result<LogId<C>, StorageError<C>>> + Send
fn get_log_id( &mut self, log_index: u64, ) -> impl Future<Output = Result<LogId<C>, StorageError<C>>> + Send
Get the log id of the entry at
index.