Trait yewdux::store::Store

source ·
pub trait Store: 'static {
    // Required methods
    fn new(cx: &Context) -> Self;
    fn should_notify(&self, old: &Self) -> bool;
}
Expand description

A type that holds application state.

Required Methods§

source

fn new(cx: &Context) -> Self

Create this store.

source

fn should_notify(&self, old: &Self) -> bool

Indicate whether or not subscribers should be notified about this change. Usually this should be set to self != old.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<L: Listener> Store for Mrc<ListenerStore<L>>

source§

impl<T: Store> Store for Mrc<T>