Skip to main content

AsColumnFamilyRef

Trait AsColumnFamilyRef 

Source
pub trait AsColumnFamilyRef {
    // Required method
    fn inner(&self) -> *mut rocksdb_column_family_handle_t;

    // Provided methods
    fn id(&self) -> u32 { ... }
    fn name(&self) -> Vec<u8>  { ... }
}
Expand description

Utility trait to accept both supported references to ColumnFamily (&ColumnFamily and BoundColumnFamily)

Required Methods§

Provided Methods§

Source

fn id(&self) -> u32

The id RocksDB assigned this column family.

Assigned in creation order and stable for the life of the column family, so it is what shows up as cf_id in listener callbacks. Reusing it after the column family is dropped is up to RocksDB.

Source

fn name(&self) -> Vec<u8>

The name this column family was created with.

Bytes rather than a String because RocksDB stores the name as given and does not require it to be UTF-8. Names created through this crate always are, since the constructors take &str.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsColumnFamilyRef for Arc<BoundColumnFamily<'_>>

Implementors§