pub struct RuntimeContext { /* private fields */ }Expand description
Process-global runtime handle shared by all database regions.
Implementations§
Source§impl RuntimeContext
impl RuntimeContext
Sourcepub fn new(config: RuntimeConfig) -> Self
pub fn new(config: RuntimeConfig) -> Self
Create a runtime context with the provided configuration.
When invoked from within an active asupersync task, this best-effort
constructor attaches the ambient native runtime context to the new
FrankenSQLite root Cx. Call Self::new_with_root_cx when the
caller already owns the canonical parent Cx and wants explicit
capability lineage rather than ambient attachment.
Sourcepub fn new_with_root_cx(config: RuntimeConfig, root_cx: &Cx) -> Self
pub fn new_with_root_cx(config: RuntimeConfig, root_cx: &Cx) -> Self
Create a runtime context rooted in a caller-supplied parent Cx.
This keeps capability lineage attached to the caller’s budget, cancellation state, and native asupersync context instead of minting a disconnected root inside FrankenSQLite.
Sourcepub const fn runtime_id(&self) -> u64
pub const fn runtime_id(&self) -> u64
Return the stable runtime identity used to isolate per-database state.
Sourcepub const fn config(&self) -> &RuntimeConfig
pub const fn config(&self) -> &RuntimeConfig
Access the runtime configuration.