Trait metrix::TransmitsTelemetryData
[−]
[src]
pub trait TransmitsTelemetryData<L> { fn transmit(&self, observation: Observation<L>); fn add_handler(&mut self, handler: Box<HandlesObservations<Label = L>>); fn add_cockpit(&mut self, cockpit: Cockpit<L>); fn observed(&self, label: L, count: u64, timestamp: Instant) { ... } fn observed_one(&self, label: L, timestamp: Instant) { ... } fn observed_one_value(&self, label: L, value: u64, timestamp: Instant) { ... } fn observed_duration(
&self,
label: L,
duration: Duration,
timestamp: Instant
) { ... } fn measure_time(&self, label: L, from: Instant) { ... } fn observed_now(&self, label: L, count: u64) { ... } fn observed_one_now(&self, label: L) { ... } fn observed_one_value_now(&self, label: L, value: u64) { ... } fn observed_one_duration_now(&self, label: L, duration: Duration) { ... } }
Required Methods
fn transmit(&self, observation: Observation<L>)
Collect an observation.
fn add_handler(&mut self, handler: Box<HandlesObservations<Label = L>>)
fn add_cockpit(&mut self, cockpit: Cockpit<L>)
Provided Methods
fn observed(&self, label: L, count: u64, timestamp: Instant)
Observed count
occurences at time timestamp
Convinience method. Simply calls transmit
fn observed_one(&self, label: L, timestamp: Instant)
Observed one occurence at time timestamp
Convinience method. Simply calls transmit
fn observed_one_value(&self, label: L, value: u64, timestamp: Instant)
Observed one occurence with value value
at time timestamp
Convinience method. Simply calls transmit
fn observed_duration(&self, label: L, duration: Duration, timestamp: Instant)
fn measure_time(&self, label: L, from: Instant)
fn observed_now(&self, label: L, count: u64)
Observed count
occurences at now.
Convinience method. Simply calls transmit
fn observed_one_now(&self, label: L)
Observed one occurence now
Convinience method. Simply calls transmit
fn observed_one_value_now(&self, label: L, value: u64)
Observed one occurence with value value
now
Convinience method. Simply calls transmit
fn observed_one_duration_now(&self, label: L, duration: Duration)
Implementors
impl<L> TransmitsTelemetryData<L> for TelemetryTransmitter<L>
impl<L> TransmitsTelemetryData<L> for TelemetryTransmitterSync<L>