silk.concurrency.ambient_table.
Storage shared by lexical providers and captured executions.
Import as AmbientTable with import silk.concurrency.ambient_table { AmbientTable }.
Public declarations: 2.
TraceContext#
pub struct TraceContextThe active span and its execution-local record.
Field traceHigh#
pub traceHigh: u64High half of the trace identifier.
Field traceLow#
pub traceLow: u64Low half of the trace identifier.
Field span#
pub span: u64The current span identifier.
Field flags#
pub flags: u64Sampling flags and local span depth.
Field owner#
pub owner: u64Identifies the recorder that owns the current span.
Field record#
pub record: u64The local open record address, or zero for an inherited span.
AmbientTable#
pub struct AmbientTableThe ambient dispatcher indexes the leading array. The active execution owns the context.
Field entries#
pub entries: [?*const u8; Intrinsic.ambientCount()]Indexed provider handles consumed by ambient dispatch.
Field context#
pub context: TraceContextThe context inherited by executions created under this table.
Implementation Copy for TraceContext#
impl Copy for TraceContextImplementation Copy for AmbientTable#
impl Copy for AmbientTableImplementation TraceContext#
impl TraceContextAssociated function empty#
pub fn empty() -> SelfAn execution with no open span has zero identifiers and no recorder.
Associated function tableAddress#
pub fn tableAddress() -> usizeIdentifies the installed table across a suspension, or zero outside an ambient scope.
Associated function read#
pub fn read() -> SelfCopies all six words from the installed execution. Returns an empty context outside a provider.
Associated function mayClose#
pub fn mayClose(previous: &Self, table: usize, owner: u64, span: u64, record: u64) -> boolChecks that a span closes in its opening table and in reverse nesting order. Returns false when no table was installed or an inactive guard left its original scope.
Associated function install#
pub unsafe fn install(context: &Self) -> ()Replaces the context of the current execution while its ambient table is installed.
Safety#
The caller must own this execution's context. A nonzero record must still belong to the recorder and execution that opened it. A saved context can only be restored to that scope.
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.