Struct tracing_core::callsite::DefaultCallsite
source · pub struct DefaultCallsite { /* private fields */ }
Expand description
A default Callsite
implementation.
Implementations§
source§impl DefaultCallsite
impl DefaultCallsite
sourcepub const fn new(meta: &'static Metadata<'static>) -> Self
pub const fn new(meta: &'static Metadata<'static>) -> Self
Returns a new DefaultCallsite
with the specified Metadata
.
sourcepub fn register(&'static self) -> Interest
pub fn register(&'static self) -> Interest
Registers this callsite with the global callsite registry.
If the callsite is already registered, this does nothing. When using
DefaultCallsite
, this method should be preferred over
[tracing_core::callsite::register
], as it ensures that the callsite is
only registered a single time.
Other callsite implementations will generally ensure that callsites are not re-registered through another mechanism.
See the documentation on callsite registration for details on the global callsite registry.