Trait rill_protocol::flow::core::Flow[][src]

pub trait Flow: DataFraction {
    type Action: DataFraction + ToEvent<Self::Event>;
    type Event: DataFraction;
    fn stream_type() -> StreamType;
fn apply(&mut self, event: TimedEvent<Self::Event>); fn pack_state(&self) -> Result<PackedState, Error> { ... }
fn unpack_state(data: &PackedState) -> 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_action(action: &Self::Action) -> Result<PackedAction, Error> { ... }
fn unpack_action(data: &PackedAction) -> Result<Self::Action, Error> { ... } }

Immutable state of a data flow.

Associated Types

type Action: DataFraction + ToEvent<Self::Event>[src]

ControlEvent - that send from a client to a server

type Event: DataFraction[src]

UpdateEvent - that sent from a server to a client

Loading content...

Required methods

fn stream_type() -> StreamType[src]

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

Loading content...

Provided methods

Loading content...

Implementors

impl Flow for ClickState[src]

type Action = ClickAction

type Event = ClickEvent

fn stream_type() -> StreamType[src]

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

impl Flow for SelectorState[src]

impl Flow for ToggleState[src]

impl Flow for CounterState[src]

type Action = ()

type Event = CounterEvent

fn stream_type() -> StreamType[src]

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

impl Flow for DictState[src]

type Action = ()

type Event = DictEvent

fn stream_type() -> StreamType[src]

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

impl Flow for GaugeState[src]

type Action = ()

type Event = GaugeEvent

fn stream_type() -> StreamType[src]

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

impl Flow for HistogramState[src]

type Action = ()

type Event = HistogramEvent

fn stream_type() -> StreamType[src]

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

impl Flow for LoggerState[src]

type Action = ()

type Event = LoggerEvent

fn stream_type() -> StreamType[src]

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

impl Flow for PulseState[src]

type Action = ()

type Event = PulseEvent

fn stream_type() -> StreamType[src]

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

impl Flow for TableState[src]

type Action = ()

type Event = TableEvent

fn stream_type() -> StreamType[src]

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

impl Flow for AlertState[src]

type Action = ()

type Event = AlertEvent

fn stream_type() -> StreamType[src]

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

impl Flow for PathState[src]

type Action = ()

type Event = PathEvent

fn stream_type() -> StreamType[src]

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

impl Flow for ReadyBoardState[src]

type Action = ()

type Event = ReadyBoardEvent

fn stream_type() -> StreamType[src]

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

Loading content...