pub trait Update<S> {
type Interest: FieldInterests;
// Required method
fn update(
&mut self,
event: EventWithInterest<Self::Interest>,
) -> Result<UpdateResult<'_, S, Self::Interest>, UpdateError>;
}
Expand description
A trait for types holding interface state that can be updated by change events.
Required Associated Types§
Sourcetype Interest: FieldInterests
type Interest: FieldInterests
The expected watcher interest type for this update target.
Required Methods§
Sourcefn update(
&mut self,
event: EventWithInterest<Self::Interest>,
) -> Result<UpdateResult<'_, S, Self::Interest>, UpdateError>
fn update( &mut self, event: EventWithInterest<Self::Interest>, ) -> Result<UpdateResult<'_, S, Self::Interest>, UpdateError>
Update state with the interface change event.