Trait kas::updatable::Updatable [−][src]
pub trait Updatable: Debug {
fn update_handle(&self) -> Option<UpdateHandle>;
fn update_self(&self) -> Option<UpdateHandle> { ... }
}
Expand description
Shared (data) objects which may notify of updates
Required methods
fn update_handle(&self) -> Option<UpdateHandle>
fn update_handle(&self) -> Option<UpdateHandle>
Get an update handle, if any is used to notify of updates
If the data supports updates through shared references (e.g. via an
internal RefCell
), then it should have an UpdateHandle
for notifying
other users of the data of the update, and return that here.
If the data is constant (not updatable) this may simply return None
.
Users registering for updates on this handle should, if possible, also
call RecursivelyUpdatable::enable_recursive_updates
.
Provided methods
fn update_self(&self) -> Option<UpdateHandle>
fn update_self(&self) -> Option<UpdateHandle>
Update self from an update handle
Data views which are themselves dependent on other shared data should
register themselves for update via Manager::update_shared_data
.