silk.trace.hook.
Bound functions used by the compiler at the entry and exits of a traced declaration.
Import as TraceHook with import silk.trace.hook as TraceHook.
Public declarations: 5.
Guard#
pub struct GuardThe caller's context, saved independently of the recorder's bounded pool.
enter#
pub fn enter<Args>(static name: string<'static>, static kind: string<'static>, static function: string<'static>,
static file: string<'static>, static packageName: string<'static>, static packageVersion: string<'static>, args: &Args) -> GuardOpens a span and saves the caller's context for every exit from the activation.
exit#
pub fn exit(guard: Guard) -> ()Closes the span after a normal or failing return.
failed#
pub fn failed(static error: string<'static>) -> ()Records the dynamic error member before closing a failed span.
cancelled#
pub fn cancelled(guard: Guard) -> ()Closes a cancelled span and restores the parent context.
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.