pub trait Update<S> {
    // Required method
    fn update(
        &mut self,
        event: Event
    ) -> Result<UpdateResult<'_, S>, UpdateError>;
}
Expand description

A trait for types holding interface state that can be updated by change events.

Required Methods§

source

fn update(&mut self, event: Event) -> Result<UpdateResult<'_, S>, UpdateError>

Update state with the interface change event.

Implementations on Foreign Types§

source§

impl<K, S> Update<S> for BTreeMap<K, PropertiesAndState<S>>
where K: TryFromMaybeNonzero + Copy + From<NonZeroU64> + Eq + Ord + Hash, S: Default,

source§

fn update(&mut self, event: Event) -> Result<UpdateResult<'_, S>, UpdateError>

source§

impl<K, S> Update<S> for HashMap<K, PropertiesAndState<S>>
where K: TryFromMaybeNonzero + Copy + From<NonZeroU64> + Eq + Ord + Hash, S: Default,

source§

fn update(&mut self, event: Event) -> Result<UpdateResult<'_, S>, UpdateError>

Implementors§