[][src]Function atomic_hooks::update_state_with_topo_id

pub fn update_state_with_topo_id<T: 'static, F: FnOnce(&mut T)>(
    id: TopoKey,
    func: F
)

Provides mutable access to the stored state type T.

Example:

update_state_with_topo_id::<Vec<String>>( topo::Id::current(), |v|
    v.push("foo".to_string()
)