pub struct SubscriberDetector;Expand description
Subscriber 检测器(带缓存)
Implementations§
Source§impl SubscriberDetector
impl SubscriberDetector
Sourcepub fn has_subscriber() -> bool
pub fn has_subscriber() -> bool
检测系统中是否已经初始化了 tracing subscriber。
实现原理:tracing::dispatcher::has_been_set() 检测全局 dispatcher 是否已设置。
Sourcepub fn detect_mode() -> LoggingMode
pub fn detect_mode() -> LoggingMode
检测并返回模式(结果会被缓存)
Auto Trait Implementations§
impl Freeze for SubscriberDetector
impl RefUnwindSafe for SubscriberDetector
impl Send for SubscriberDetector
impl Sync for SubscriberDetector
impl Unpin for SubscriberDetector
impl UnwindSafe for SubscriberDetector
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