pub struct NullStore;Expand description
A TraceStore that discards every span and event. Lets integrators compile
tracing in but disable it at runtime (init_custom(Arc::new(NullStore)))
without their own cfg shims.
Trait Implementations§
impl Copy for NullStore
Source§impl TraceStore for NullStore
impl TraceStore for NullStore
fn record_span<'life0, 'async_trait>(
&'life0 self,
_span: SpanRecord,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
NullStore: 'async_trait,
Source§fn record_event<'life0, 'async_trait>(
&'life0 self,
_event: EventRecord,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn record_event<'life0, 'async_trait>(
&'life0 self,
_event: EventRecord,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Record an intra-span event. Defaults to a no-op so existing stores keep
compiling; stores that support events override this.
Auto Trait Implementations§
impl Freeze for NullStore
impl RefUnwindSafe for NullStore
impl Send for NullStore
impl Sync for NullStore
impl Unpin for NullStore
impl UnsafeUnpin for NullStore
impl UnwindSafe for NullStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more