MCPcopy Create free account
hub / github.com/AccessKit/accesskit / resolve_app_context

Method resolve_app_context

platforms/atspi-common/src/node.rs:1695–1705  ·  view source on GitHub ↗
(&self, f: F)

Source from the content-addressed store, hash-verified

1693 }
1694
1695 fn resolve_app_context<F, T>(&self, f: F) -> Result<T>
1696 where
1697 for<'a> F: FnOnce(RwLockReadGuard<'a, AppContext>) -> Result<T>,
1698 {
1699 let app_context = match self.app_context.upgrade() {
1700 Some(context) => context,
1701 None => return Err(Error::Defunct),
1702 };
1703 let app_context = app_context.read().unwrap();
1704 f(app_context)
1705 }
1706
1707 pub fn name(&self) -> Result<String> {
1708 self.resolve_app_context(|context| Ok(context.name.clone().unwrap_or_default()))

Callers 11

nameMethod · 0.80
child_countMethod · 0.80
child_at_indexMethod · 0.80
child_id_at_indexMethod · 0.80
map_childrenMethod · 0.80
map_child_idsMethod · 0.80
toolkit_nameMethod · 0.80
toolkit_versionMethod · 0.80
idMethod · 0.80
map_descendantsMethod · 0.80

Calls 2

upgradeMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected