Trait biometrics::Emitter

source ·
pub trait Emitter {
    type Error;

    // Required methods
    fn emit_counter(
        &mut self,
        counter: &'static Counter,
        now_millis: u64
    ) -> Result<(), Self::Error>;
    fn emit_gauge(
        &mut self,
        gauge: &'static Gauge,
        now_millis: u64
    ) -> Result<(), Self::Error>;
    fn emit_moments(
        &mut self,
        moments: &'static Moments,
        now_millis: u64
    ) -> Result<(), Self::Error>;
}
Expand description

Emitter outputs the sensor state via I/O.

Required Associated Types§

source

type Error

The type of error this emitter returns.

Required Methods§

source

fn emit_counter( &mut self, counter: &'static Counter, now_millis: u64 ) -> Result<(), Self::Error>

Read the provided Counter.

source

fn emit_gauge( &mut self, gauge: &'static Gauge, now_millis: u64 ) -> Result<(), Self::Error>

Read the provided Gauge.

source

fn emit_moments( &mut self, moments: &'static Moments, now_millis: u64 ) -> Result<(), Self::Error>

Read the provided Moments.

Implementors§