Add the entity trait and implement for models, views, subscriptions, and observations
This commit is contained in:
parent
58446c2715
commit
327a2f9967
13 changed files with 183 additions and 101 deletions
|
@ -726,7 +726,7 @@ impl Context for AppContext {
|
|||
|
||||
/// Update the entity referenced by the given model. The function is passed a mutable reference to the
|
||||
/// entity along with a `ModelContext` for the entity.
|
||||
fn update_entity<T: 'static, R>(
|
||||
fn update_model<T: 'static, R>(
|
||||
&mut self,
|
||||
model: &Model<T>,
|
||||
update: impl FnOnce(&mut T, &mut Self::ModelContext<'_, T>) -> R,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue