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§
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<()>
Sourceasync fn storage_probe(
db: &SqlStorage,
opt: &SqlOptions,
) -> Result<Option<StorageProbe>>
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
impl BackendOptions for Db
Source§fn light_client_db(cfg: &Config, query: &Query) -> LightClientDbOptions
fn light_client_db(cfg: &Config, query: &Query) -> LightClientDbOptions
A Postgres node keeps its light client in the same database, so it survives restarts and container replacement without any extra volume.