global

Function global 

Source
pub fn global() -> Result<&'static MagicDb, Error>
Available on crate feature global only.
Expand description

Returns a process-wide read-only MagicDb initialized on first use.

This function is provided as a convenience for applications that want a shared database without managing its lifetime explicitly. The database is kept alive until program termination.

If you need explicit control over the database lifetime or want multiple independent instances, use load instead.