pub trait Stateful<S: StatePack>: Clone + Default {
    type Data;

    // Required methods
    fn message(self) -> Message<Self::Data>;
    fn state(self) -> S;
    fn timestamp(self) -> i64;

    // Provided methods
    fn by_ref(&self) -> Self { ... }
    fn by_ref_mut(&mut self) -> Self { ... }
    fn by_arc(self: Arc<Self>) -> Arc<Self> { ... }
}

Required Associated Types§

Required Methods§

source

fn message(self) -> Message<Self::Data>

source

fn state(self) -> S

source

fn timestamp(self) -> i64

Provided Methods§

source

fn by_ref(&self) -> Self

source

fn by_ref_mut(&mut self) -> Self

source

fn by_arc(self: Arc<Self>) -> Arc<Self>

Implementors§

source§

impl<S: Clone + StatePack, T: Clone + Default + Serialize> Stateful<S> for State<S, T>

§

type Data = T