pub struct SealedSegment<F> { /* private fields */ }
Expand description
an immutable, wal segment
Implementations§
Source§impl<F> SealedSegment<F>
impl<F> SealedSegment<F>
Source§impl<F: FileExt> SealedSegment<F>
impl<F: FileExt> SealedSegment<F>
pub fn open( file: Arc<F>, path: PathBuf, read_locks: Arc<AtomicU64>, now: DateTime<Utc>, ) -> Result<Option<Self>>
pub fn path(&self) -> &Path
pub fn read_page_offset(&self, offset: u32, buf: &mut [u8]) -> Result<()>
pub fn read_frame_offset(&self, offset: u32, frame: &mut Frame) -> Result<()>
Source§impl<F> SealedSegment<F>
impl<F> SealedSegment<F>
Trait Implementations§
Source§impl<F> Clone for SealedSegment<F>
impl<F> Clone for SealedSegment<F>
Source§impl<F: Debug> Debug for SealedSegment<F>
impl<F: Debug> Debug for SealedSegment<F>
Source§impl<F> Deref for SealedSegment<F>
impl<F> Deref for SealedSegment<F>
Source§impl<F> Segment for SealedSegment<F>where
F: FileExt,
impl<F> Segment for SealedSegment<F>where
F: FileExt,
async fn compact(&self, out_file: &impl FileExt, id: Uuid) -> Result<Vec<u8>>
fn start_frame_no(&self) -> u64
fn last_committed(&self) -> u64
fn index(&self) -> &Map<Arc<[u8]>>
fn read_page( &self, page_no: u32, max_frame_no: u64, buf: &mut [u8], ) -> Result<bool>
Source§fn is_checkpointable(&self) -> bool
fn is_checkpointable(&self) -> bool
returns the number of readers currently holding a reference to this log.
The read count must monotonically decrease.
Source§fn size_after(&self) -> u32
fn size_after(&self) -> u32
The size of the database after applying this segment.
async fn read_frame_offset_async<B>( &self, offset: u32, buf: B, ) -> (B, Result<()>)
fn destroy<IO: Io>(&self, io: &IO) -> impl Future<Output = ()>
fn timestamp(&self) -> DateTime<Utc>
Auto Trait Implementations§
impl<F> Freeze for SealedSegment<F>
impl<F> RefUnwindSafe for SealedSegment<F>where
F: RefUnwindSafe,
impl<F> Send for SealedSegment<F>
impl<F> Sync for SealedSegment<F>
impl<F> Unpin for SealedSegment<F>
impl<F> UnwindSafe for SealedSegment<F>where
F: 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> 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> 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.