Skip to main content

ShareFilesNaming

Struct ShareFilesNaming 

Source
pub struct ShareFilesNaming(/* private fields */);
Expand description

Naming scheme for table and blob files in the shared_checksum directory.

Mirrors BackupEngineOptions::ShareFilesNaming in include/rocksdb/utilities/backup_engine.h. It is a bit mask with two parts: the low 16 bits select one naming scheme, the high bits carry independent flags. RocksDB masks the two apart with Self::MASK_NO_NAMING_FLAGS and Self::MASK_NAMING_FLAGS.

Only takes effect when both share_table_files and share_files_with_checksum are true.

Implementations§

Source§

impl ShareFilesNaming

Source

pub const LEGACY_CRC32C_AND_FILE_SIZE: Self

kLegacyCrc32cAndFileSize. Names files <file_number>_<crc32c>_<file_size>.sst and .blob. Only recommended for preserving old behaviour: the triple can collide at massive scale, and picking the name requires reading the whole file to checksum it.

Source

pub const USE_DB_SESSION_ID: Self

kUseDbSessionId. Names SST files <file_number>_s<db_session_id>.sst, which is strongly unique and known without reading the file. Blob files and SST files with no session id fall back to Self::LEGACY_CRC32C_AND_FILE_SIZE.

Source

pub const FLAG_INCLUDE_FILE_SIZE: Self

kFlagIncludeFileSize. Inserts _<file_size> before the extension when the scheme does not already include it.

This is bit 31. The C API passes the mask as an int, so a value carrying this flag reads back negative from Self::bits.

Source

pub const MASK_NO_NAMING_FLAGS: Self

kMaskNoNamingFlags. Selects the naming scheme bits.

Source

pub const MASK_NAMING_FLAGS: Self

kMaskNamingFlags. Selects the flag bits.

Source

pub const DEFAULT: Self

Source

pub const fn bits(self) -> c_int

Returns the raw mask as the C API represents it.

Source

pub const fn contains(self, other: Self) -> bool

Returns true when every bit set in other is also set in self.

Trait Implementations§

Source§

impl BitOr for ShareFilesNaming

Source§

type Output = ShareFilesNaming

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self

Performs the | operation. Read more
Source§

impl Clone for ShareFilesNaming

Source§

fn clone(&self) -> ShareFilesNaming

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ShareFilesNaming

Source§

impl Debug for ShareFilesNaming

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for ShareFilesNaming

Source§

impl PartialEq for ShareFilesNaming

Source§

fn eq(&self, other: &ShareFilesNaming) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ShareFilesNaming

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.