Trait DatabaseDescription

Source
pub trait DatabaseDescription:
    'static
    + Copy
    + Debug
    + Send
    + Sync {
    type Column: StorageColumn + EnumCount + Sequence;
    type Height: DatabaseHeight;

    // Required methods
    fn version() -> u32;
    fn name() -> String;
    fn metadata_column() -> Self::Column;
    fn prefix(column: &Self::Column) -> Option<usize>;
}
Expand description

The description of the database that makes it unique.

Required Associated Types§

Source

type Column: StorageColumn + EnumCount + Sequence

The type of the column used by the database.

Source

type Height: DatabaseHeight

The type of the height of the database used to track commits.

Required Methods§

Source

fn version() -> u32

Returns the expected version of the database.

Source

fn name() -> String

Returns the name of the database.

Source

fn metadata_column() -> Self::Column

Returns the column used to store the metadata.

Source

fn prefix(column: &Self::Column) -> Option<usize>

Returns the prefix for the column.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§