Skip to main content

BackendOptions

Trait BackendOptions 

Source
pub(crate) trait BackendOptions {
    // Required methods
    fn apply(cfg: Config, opt: &SqlOptions) -> Result<Config>;
    fn light_client_db(cfg: &Config, query: &Query) -> LightClientDbOptions;
    async fn reset_light_client(cfg: &Config) -> Result<()>;
    async fn storage_probe(
        db: &SqlStorage,
        opt: &SqlOptions,
    ) -> Result<Option<StorageProbe>>;
}
Expand description

Node setup that differs between the SQL backends.

Required Methods§

Source

fn apply(cfg: Config, opt: &SqlOptions) -> Result<Config>

Source

fn light_client_db(cfg: &Config, query: &Query) -> LightClientDbOptions

Source

async fn reset_light_client(cfg: &Config) -> Result<()>

Source

async fn storage_probe( db: &SqlStorage, opt: &SqlOptions, ) -> Result<Option<StorageProbe>>

A probe of the database file and its settings, for a backend that keeps the database in one.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl BackendOptions for Db

Source§

fn apply(cfg: Config, opt: &SqlOptions) -> Result<Config>

Source§

fn light_client_db(_cfg: &Config, query: &Query) -> LightClientDbOptions

Source§

async fn reset_light_client(_cfg: &Config) -> Result<()>

Source§

async fn storage_probe( db: &SqlStorage, opt: &SqlOptions, ) -> Result<Option<StorageProbe>>

Implementors§