pub struct MetaEntry { /* private fields */ }Expand description
§Safety
MetaEntry stores a FilterRef<'static> with a transmuted lifetime that actually borrows
from the parent MetaFile’s stable backing bytes. This is safe as long as an entry never
outlives that backing: entries are only handed out by reference, and the one place that moves
them (MetaFile::retain_entries) keeps them inside the same MetaFile.
For this reason this type should not implement Clone or Copy — a copy could outlive the
MetaFile that owns the backing it points into.
Implementations§
Source§impl MetaEntry
impl MetaEntry
pub fn sequence_number(&self) -> u32
pub fn size(&self) -> u64
pub fn flags(&self) -> MetaEntryFlags
pub fn amqf_size(&self) -> u32
pub fn amqf(&self) -> &FilterRef<'static>
Sourcepub fn raw_amqf<'l>(&self, amqf_data: &'l [u8]) -> &'l [u8] ⓘ
pub fn raw_amqf<'l>(&self, amqf_data: &'l [u8]) -> &'l [u8] ⓘ
Returns the raw serialized AMQF bytes from the stable backing.
pub fn block_count(&self) -> u16
Sourcepub fn sst_metadata(&self) -> StaticSortedFileMetaData
pub fn sst_metadata(&self) -> StaticSortedFileMetaData
Returns the SST metadata needed to open the file independently. Used during compaction to avoid caching mmaps on the MetaEntry.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MetaEntry
impl RefUnwindSafe for MetaEntry
impl Unpin for MetaEntry
impl UnsafeUnpin for MetaEntry
impl UnwindSafe for MetaEntry
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more