pub struct Sampler<'a> {
meter: &'a mut Meter,
created_at: Instant,
}
Expand description
Sampler.
Samplers record how long they are “alive” for and update the meter on drop..
Fields§
§meter: &'a mut Meter
Reference to meter that created the sampler.
created_at: Instant
When the sampler was created.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> RefUnwindSafe for Sampler<'a>
impl<'a> Send for Sampler<'a>
impl<'a> Sync for Sampler<'a>
impl<'a> Unpin for Sampler<'a>
impl<'a> !UnwindSafe for Sampler<'a>
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