Struct NoSubscriber

pub struct NoSubscriber(/* private field */);

A no-op Subscriber.

NoSubscriber implements the Subscriber trait by never being enabled, never being interested in any callsite, and dropping all spans and events.

Implementations

impl NoSubscriber

const fn new() -> Self

Returns a new NoSubscriber.

Trait Implementations

impl Clone for NoSubscriber

fn clone(&self) -> NoSubscriber

impl Copy for NoSubscriber

impl Debug for NoSubscriber

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Default for NoSubscriber

fn default() -> NoSubscriber

impl Subscriber for NoSubscriber

fn register_callsite(&self, &'static Metadata<'static>) -> Interest
fn new_span(&self, &Attributes<'_>) -> Id
fn event(&self, _event: &Event<'_>)
fn record(&self, _span: &Id, _values: &Record<'_>)
fn record_follows_from(&self, _span: &Id, _follows: &Id)
fn enabled(&self, _metadata: &Metadata<'_>) -> bool
fn enter(&self, _span: &Id)
fn exit(&self, _span: &Id)

Auto Trait Implementations

impl Freeze for NoSubscriber

impl RefUnwindSafe for NoSubscriber

impl Send for NoSubscriber

impl Sync for NoSubscriber

impl Unpin for NoSubscriber

impl UnsafeUnpin for NoSubscriber

impl UnwindSafe for NoSubscriber

Blanket Implementations

impl<T> Any for NoSubscriber where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for NoSubscriber where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for NoSubscriber where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for NoSubscriber where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for NoSubscriber

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for NoSubscriber where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for NoSubscriber where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for NoSubscriber 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 NoSubscriber where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>