Skip to main content

init

Function init 

Source
pub fn init(explicit: Option<Language>)
Expand description

Initializes the global language. Subsequent calls are silently ignored (OnceLock semantics) — guaranteeing thread-safety and determinism.

v1.0.36 (L6): early-return when already initialized so the env-fallback resolver (from_env_or_locale) does not run a second time. Without this guard, calling init(None) after current() already populated the OnceLock causes from_env_or_locale to fire its tracing::warn! twice for unrecognized SQLITE_GRAPHRAG_LANG values.