Trait holochain_state::prelude::DbKindT

source ·
pub trait DbKindT: Clone + Debug + Send + Sync + 'static {
    // Required methods
    fn kind(&self) -> DbKind;
    fn filename_inner(&self) -> PathBuf;
    fn if_corrupt_wipe(&self) -> bool;

    // Provided method
    fn filename(&self) -> PathBuf { ... }
}

Required Methods§

source

fn kind(&self) -> DbKind

source

fn filename_inner(&self) -> PathBuf

The above provided filename method attaches the .sqlite3 extension. Implement this to provide the front part of the database filename.

source

fn if_corrupt_wipe(&self) -> bool

Whether to wipe the database if it is corrupt. Some database it’s safe to wipe them if they are corrupt because they can be refilled from the network. Other databases cannot be refilled and some manual intervention is required.

Provided Methods§

source

fn filename(&self) -> PathBuf

Constuct a partial Path based on the kind

Object Safety§

This trait is not object safe.

Implementors§