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.
This constructor always creates a cancellation-detached FrankenSQLite
root Cx, even when invoked from within an active asupersync task.
Call Self::new_with_root_cx when the caller already owns the
canonical parent Cx and wants explicit capability lineage.
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.
Trait Implementations§
Source§impl Debug for RuntimeContext
impl Debug for RuntimeContext
Auto Trait Implementations§
impl !RefUnwindSafe for RuntimeContext
impl !UnwindSafe for RuntimeContext
impl Freeze for RuntimeContext
impl Send for RuntimeContext
impl Sync for RuntimeContext
impl Unpin for RuntimeContext
impl UnsafeUnpin for RuntimeContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).