Skip to main content

get_engine

Function get_engine 

Source
pub fn get_engine() -> StorageResult<&'static StorageEngine>
Expand description

Return a reference to the globally-initialised StorageEngine.

The engine is lazily initialised on first access using StorageEngine::from_env. Subsequent calls return the same instance.

ยงErrors

Returns StorageError::Init if environment variables are invalid or the backend cannot be configured.