pub struct Tracer<T: Flow> { /* private fields */ }Expand description
The generic provider that forwards metrics to worker and keeps a flag
for checking the activitiy status of the Tracer.
Implementations§
Source§impl<T: Flow> Tracer<T>
impl<T: Flow> Tracer<T>
Sourcepub fn new_pull(state: T, path: Path, interval: Option<Duration>) -> Self
pub fn new_pull(state: T, path: Path, interval: Option<Duration>) -> Self
Create a Pull mode Tracer
Sourcepub fn description(&self) -> &Description
pub fn description(&self) -> &Description
Returns a reference to a Description of the Tracer.
Sourcepub fn send(
&self,
event: T::Event,
direction: Option<Direction<ProviderProtocol>>,
)
pub fn send( &self, event: T::Event, direction: Option<Direction<ProviderProtocol>>, )
Send an event to a Recorder.
Sourcepub fn sync_callback<F>(&self, callback: F)
pub fn sync_callback<F>(&self, callback: F)
Assign a sync callback
Sourcepub fn async_callback<F, Fut>(&self, callback: F)
pub fn async_callback<F, Fut>(&self, callback: F)
Assign an async callback
Sourcepub fn detach_callback(&self)
pub fn detach_callback(&self)
Removes the callback
Trait Implementations§
Source§impl<T: Flow> PartialEq for Tracer<T>
Both tracers are equal only if they use the same description.
That means they both have the same recorder/channel.
impl<T: Flow> PartialEq for Tracer<T>
Both tracers are equal only if they use the same description. That means they both have the same recorder/channel.
impl<T: Flow> Eq for Tracer<T>
Auto Trait Implementations§
impl<T> Freeze for Tracer<T>
impl<T> RefUnwindSafe for Tracer<T>
impl<T> Send for Tracer<T>
impl<T> Sync for Tracer<T>
impl<T> Unpin for Tracer<T>
impl<T> UnwindSafe for Tracer<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.