Crate call_trace_tls

Source
Expand description

§Example (simple)

Output:

§Example (custom callback)

Output

Structs§

CallContext
Contains information about the current call site.
Context
The thread-local callback context for #[trace].
Tls
Delegates to a trace kept in TLS.

Enums§

Event
Indicates why the callback got called by #[trace]

Traits§

Trace
Tracing interface invoked by #[trace] and #[trace_with]

Functions§

thread_access_with
Access the thread-local context of #[trace]
thread_register_callback
Registers a callback in the thread-local context. This is a shortcut for accessing the Context via thread_access_with().
thread_unregister_callback
Unregisters a callback in the thread-local context. This is a shortcut for accessing the Context via thread_access_with().

Type Aliases§

Callback
A callback. It gets called by #[trace].

Attribute Macros§

trace_with
The #[trace_with] macro. Needs to be applied to function definitions, and will invoke hte Trace interface on the user-provided expression.