[][src]Function comp_state::prelude::update_state_with_topo_id

pub fn update_state_with_topo_id<T: Clone + 'static, F: FnOnce(&mut T)>(
    id: Id,
    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()
)