Trait rill_protocol::flow::core::Flow [−][src]
pub trait Flow: DataFraction { type Action: DataFraction; 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> { ... } }
Expand description
Immutable state of a data flow.
Associated Types
type Action: DataFraction[src]
type Action: DataFraction[src]ControlEvent - that send from a client to a server
type Event: DataFraction[src]
type Event: DataFraction[src]UpdateEvent - that sent from a server to a client
Required methods
fn stream_type() -> StreamType[src]
fn apply(&mut self, event: TimedEvent<Self::Event>)[src]
Provided methods
fn pack_state(&self) -> Result<PackedState, Error>[src]
fn unpack_state(data: &PackedState) -> Result<Self, Error>[src]
fn pack_delta(delta: &[TimedEvent<Self::Event>]) -> Result<PackedDelta, Error>[src]
fn unpack_delta(data: &PackedDelta) -> Result<Delta<Self::Event>, Error>[src]
fn pack_action(action: &Self::Action) -> Result<PackedAction, Error>[src]
fn unpack_action(data: &PackedAction) -> Result<Self::Action, Error>[src]
Implementors
impl Flow for ClickState[src]
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 SelectorState[src]type Action = SelectorAction
type Event = SelectorEvent
fn stream_type() -> StreamType[src]
fn apply(&mut self, event: TimedEvent<Self::Event>)[src]
impl Flow for ToggleState[src]
impl Flow for ToggleState[src]type Action = ToggleAction
type Event = ToggleEvent
fn stream_type() -> StreamType[src]
fn apply(&mut self, event: TimedEvent<Self::Event>)[src]
impl Flow for CounterState[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]
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]
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]
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]
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]
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]
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]
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]
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]
impl Flow for ReadyBoardState[src]