pub struct CollectorGuard { /* private fields */ }Expand description
RAII guard. While alive, the thread-local current collector is set to the supplied collector; on drop it is cleared.
Implementations§
Source§impl CollectorGuard
impl CollectorGuard
pub fn install(collector: Arc<MetricsCollector>) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CollectorGuard
impl RefUnwindSafe for CollectorGuard
impl Send for CollectorGuard
impl Sync for CollectorGuard
impl Unpin for CollectorGuard
impl UnsafeUnpin for CollectorGuard
impl UnwindSafe for CollectorGuard
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