Struct metrix::TelemetryTransmitter
source · pub struct TelemetryTransmitter<L> { /* private fields */ }
Expand description
Transmits Observation
s to the backend
This struct does not implement the Sync
trait
and can therefore not be shared between threads.
See synced()
method.
Implementations§
source§impl<L> TelemetryTransmitter<L>where
L: Send + 'static,
impl<L> TelemetryTransmitter<L>where
L: Send + 'static,
sourcepub fn synced(&self) -> TelemetryTransmitterSync<L>
pub fn synced(&self) -> TelemetryTransmitterSync<L>
Get a TelemetryTransmitterSync
.
Trait Implementations§
source§impl<L: Clone> Clone for TelemetryTransmitter<L>
impl<L: Clone> Clone for TelemetryTransmitter<L>
source§fn clone(&self) -> TelemetryTransmitter<L>
fn clone(&self) -> TelemetryTransmitter<L>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<L> TransmitsTelemetryData<L> for TelemetryTransmitter<L>
impl<L> TransmitsTelemetryData<L> for TelemetryTransmitter<L>
source§fn transmit(&self, observation: Observation<L>) -> &Self
fn transmit(&self, observation: Observation<L>) -> &Self
Transit an observation to the backend.
source§fn add_handler(&self, handler: Box<dyn HandlesObservations<Label = L>>) -> &Self
fn add_handler(&self, handler: Box<dyn HandlesObservations<Label = L>>) -> &Self
Add a handler.
source§fn add_cockpit(&self, cockpit: Cockpit<L>) -> &Self
fn add_cockpit(&self, cockpit: Cockpit<L>) -> &Self
Add a
Copckpit
source§fn observed_one(&self, label: L, timestamp: Instant) -> &Self
fn observed_one(&self, label: L, timestamp: Instant) -> &Self
Observed one occurence at time
timestamp
Read moresource§fn observed_duration(
&self,
label: L,
duration: Duration,
timestamp: Instant
) -> &Self
fn observed_duration(
&self,
label: L,
duration: Duration,
timestamp: Instant
) -> &Self
Sends a
Duration
as an observed value observed at timestamp
.
The Duration
is converted to nanoseconds. Read moresource§fn observed_now(&self, label: L, count: u64) -> &Self
fn observed_now(&self, label: L, count: u64) -> &Self
Observed
count
occurences at now. Read moresource§fn observed_one_now(&self, label: L) -> &Self
fn observed_one_now(&self, label: L) -> &Self
Observed one occurence now Read more
source§fn observed_one_value_now(&self, label: L, value: u64) -> &Self
fn observed_one_value_now(&self, label: L, value: u64) -> &Self
Observed one occurence with value
value
now Read more