Struct tracing::collect::NoCollector
source · [−]pub struct NoCollector(_);
Expand description
A no-op collector.
NoCollector
implements the Collect
trait by never being enabled,
never being interested in any callsite, and drops all spans and events.
Implementations
sourceimpl NoCollector
impl NoCollector
sourcepub const fn new() -> NoCollector
pub const fn new() -> NoCollector
Returns a new NoCollector
instance.
This function is equivalent to calling NoCollector::default()
, but
this is usable in const fn
contexts.
Trait Implementations
sourceimpl Clone for NoCollector
impl Clone for NoCollector
sourcefn clone(&self) -> NoCollector
fn clone(&self) -> NoCollector
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Collect for NoCollector
impl Collect for NoCollector
sourcefn register_callsite(&self, &'static Metadata<'static>) -> Interest
fn register_callsite(&self, &'static Metadata<'static>) -> Interest
sourcefn new_span(&self, &Attributes<'_>) -> Id
fn new_span(&self, &Attributes<'_>) -> Id
sourcefn record_follows_from(&self, _span: &Id, _follows: &Id)
fn record_follows_from(&self, _span: &Id, _follows: &Id)
Adds an indication that span
follows from the span with the id
follows
. Read more
sourcefn current_span(&self) -> Current
fn current_span(&self) -> Current
Returns a type representing this collector’s view of the current span. Read more
sourcefn max_level_hint(&self) -> Option<LevelFilter>
fn max_level_hint(&self) -> Option<LevelFilter>
Returns the highest verbosity level that this Collector
will
enable, or None
, if the collector does not implement level-based
filtering or chooses not to implement this method. Read more
sourcefn clone_span(&self, id: &Id) -> Id
fn clone_span(&self, id: &Id) -> Id
sourcefn drop_span(&self, _id: Id)
fn drop_span(&self, _id: Id)
use Collector::try_close
instead
This method is deprecated. Read more
sourceimpl Debug for NoCollector
impl Debug for NoCollector
sourceimpl Default for NoCollector
impl Default for NoCollector
sourcefn default() -> NoCollector
fn default() -> NoCollector
Returns the “default value” for a type. Read more
impl Copy for NoCollector
Auto Trait Implementations
impl RefUnwindSafe for NoCollector
impl Send for NoCollector
impl Sync for NoCollector
impl Unpin for NoCollector
impl UnwindSafe for NoCollector
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T: Future> Future for Instrumented<T> type Output = T::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T: Future> Future for Instrumented<T> type Output = T::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T: Future> Future for Instrumented<T> type Output = T::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T: Future> Future for Instrumented<T> type Output = T::Output;
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithCollector for T
impl<T> WithCollector for T
sourcefn with_collector<C>(self, collector: C) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
where
C: Into<Dispatch>,
fn with_collector<C>(self, collector: C) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
where
C: Into<Dispatch>,
std
only.Attaches the provided collector to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_collector(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
fn with_current_collector(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T: Future> Future for WithDispatch<T> type Output = T::Output;
std
only.Attaches the current default collector to this type, returning a
WithDispatch
wrapper. Read more