Skip to main content

ColumnFamilyLogNumbers

Struct ColumnFamilyLogNumbers 

Source
pub struct ColumnFamilyLogNumbers<'a> { /* private fields */ }
Expand description

Which log each column family still needs replayed, handed to the filter once before any records are.

The borrow lasts for the callback only. The C API layer flattens RocksDB’s two std::maps into arrays on its own stack and frees them as soon as the callback returns, so nothing here can be kept.

Implementations§

Source§

impl<'a> ColumnFamilyLogNumbers<'a>

Source

pub fn log_numbers(&self) -> impl Iterator<Item = (u32, u64)> + '_

Every column family id paired with the log number it was last flushed at.

A record from a log older than a family’s number is already in an SST for that family, which is how a filter decides whether a record still matters.

Source

pub fn log_number(&self, cf_id: u32) -> Option<u64>

The log number for one column family id.

Source

pub fn names(&self) -> impl Iterator<Item = (&'a [u8], u32)> + '_

Every column family name paired with its id.

Column family handles are not open yet during recovery, so a name is all a filter has to go on. Names are raw bytes because RocksDB does not require them to be UTF-8.

Source

pub fn id(&self, name: &[u8]) -> Option<u32>

The id of the column family with this name.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.