Struct DefaultCallsite
pub struct DefaultCallsite { /* private fields */ }
A default Callsite implementation.
Implementations
impl DefaultCallsite
const fn new(meta: &'static Metadata<'static>) -> SelfReturns a new
DefaultCallsitewith the specifiedMetadata.fn register(&'static self) -> InterestRegisters this callsite with the global callsite registry.
If the callsite is already registered, this does nothing. When using
DefaultCallsite, this method should be preferred overtracing_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.
fn interest(&'static self) -> InterestReturns the callsite's cached
Interest, or registers it for the first time if it has not yet been registered.
Trait Implementations
impl Callsite for DefaultCallsite
fn set_interest(&self, interest: Interest)fn metadata(&self) -> &Metadata<'static>
impl Debug for DefaultCallsite
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Auto Trait Implementations
impl !Freeze for DefaultCallsite
impl !RefUnwindSafe for DefaultCallsite
impl !UnwindSafe for DefaultCallsite
impl Send for DefaultCallsite
impl Sync for DefaultCallsite
impl Unpin for DefaultCallsite
impl UnsafeUnpin for DefaultCallsite
Blanket Implementations
impl<T> Any for DefaultCallsite
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for DefaultCallsite
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for DefaultCallsite
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for DefaultCallsite
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for DefaultCallsite
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for DefaultCallsite
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for DefaultCallsite
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>