Trait rill_protocol::data::Metric[][src]

pub trait Metric: DataFraction {
    type State: DataFraction;
    type Event: DataFraction;
    fn stream_type() -> StreamType;
fn apply(&self, state: &mut Self::State, event: TimedEvent<Self::Event>); fn pack_metric(&self) -> Result<PackedMetric, Error> { ... }
fn unpack_metric(data: &PackedMetric) -> Result<Self, Error> { ... }
fn pack_delta(
        delta: &[TimedEvent<Self::Event>]
    ) -> Result<PackedDelta, Error> { ... }
fn unpack_delta(data: &PackedDelta) -> Result<Delta<Self::Event>, Error> { ... }
fn pack_state(state: &Self::State) -> Result<PackedState, Error> { ... }
fn unpack_state(data: &PackedState) -> Result<Self::State, Error> { ... } }

Immutable state of a data flow.

Associated Types

Loading content...

Required methods

fn stream_type() -> StreamType[src]

fn apply(&self, state: &mut Self::State, event: TimedEvent<Self::Event>)[src]

Loading content...

Provided methods

Loading content...

Implementors

impl Metric for CounterMetric[src]

type State = CounterState

type Event = CounterEvent

impl Metric for DictMetric[src]

type State = DictState

type Event = DictEvent

impl Metric for GaugeMetric[src]

type State = GaugeState

type Event = GaugeEvent

impl Metric for HistogramMetric[src]

type State = HistogramState

type Event = HistogramEvent

impl Metric for LoggerMetric[src]

type State = LoggerState

type Event = LoggerEvent

impl Metric for PulseMetric[src]

type State = PulseState

type Event = PulseEvent

impl Metric for TableMetric[src]

type State = TableState

type Event = TableEvent

Loading content...