pub struct SegmentList<Seg> { /* private fields */ }
Implementations§
Source§impl<Seg> SegmentList<Seg>where
Seg: Segment,
impl<Seg> SegmentList<Seg>where
Seg: Segment,
Sourcepub async fn checkpoint<IO: Io>(
&self,
db_file: &IO::File,
until_frame_no: u64,
log_id: Uuid,
io: &IO,
) -> Result<Option<u64>>
pub async fn checkpoint<IO: Io>( &self, db_file: &IO::File, until_frame_no: u64, log_id: Uuid, io: &IO, ) -> Result<Option<u64>>
Checkpoints as many segments as possible to the main db file, and return the checkpointed frame_no, if anything was checkpointed
Sourcepub async fn stream_pages_from<'a>(
&self,
current_fno: u64,
until_fno: u64,
seen: &'a mut RoaringBitmap,
) -> (impl Stream<Item = Result<Box<Frame>>> + 'a, u64)
pub async fn stream_pages_from<'a>( &self, current_fno: u64, until_fno: u64, seen: &'a mut RoaringBitmap, ) -> (impl Stream<Item = Result<Box<Frame>>> + 'a, u64)
returns a stream of pages from the sealed segment list, and what’s the lowest replication index that was covered. If the returned index is less than start frame_no, the missing frames must be read somewhere else.
Methods from Deref<Target = List<Seg>>§
Trait Implementations§
Source§impl<Seg: Debug> Debug for SegmentList<Seg>
impl<Seg: Debug> Debug for SegmentList<Seg>
Source§impl<Seg> Default for SegmentList<Seg>
impl<Seg> Default for SegmentList<Seg>
Auto Trait Implementations§
impl<Seg> !Freeze for SegmentList<Seg>
impl<Seg> RefUnwindSafe for SegmentList<Seg>where
Seg: RefUnwindSafe,
impl<Seg> Send for SegmentList<Seg>
impl<Seg> Sync for SegmentList<Seg>
impl<Seg> Unpin for SegmentList<Seg>
impl<Seg> UnwindSafe for SegmentList<Seg>where
Seg: RefUnwindSafe,
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.