pub struct Subscriber;Expand description
A type that can be used to create a Subscriber which collects tracing
spans and events and emits them in JSON.
This type is actually ZST and is only useful to call builder to configure
a subscriber.
Implementations§
Source§impl Subscriber
impl Subscriber
Sourcepub fn builder() -> SubscriberBuilder
pub fn builder() -> SubscriberBuilder
Creates a SubscriberBuilder which can be used to configure a Subscriber.
§Examples
let subscriber = Subscriber::builder()
.with_max_level(tracing::Level::INFO)
.with_target(false)
.finish();Auto Trait Implementations§
impl Freeze for Subscriber
impl RefUnwindSafe for Subscriber
impl Send for Subscriber
impl Sync for Subscriber
impl Unpin for Subscriber
impl UnsafeUnpin for Subscriber
impl UnwindSafe for Subscriber
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