MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / accessibility_cache_key

Function accessibility_cache_key

packages/server/src/api/routes.rs:3371–3391  ·  view source on GitHub ↗
(
    udid: &str,
    source: Option<&str>,
    max_depth: Option<usize>,
    include_hidden: bool,
    interactive_only: bool,
)

Source from the content-addressed store, hash-verified

3369}
3370
3371fn accessibility_cache_key(
3372 udid: &str,
3373 source: Option<&str>,
3374 max_depth: Option<usize>,
3375 include_hidden: bool,
3376 interactive_only: bool,
3377) -> Option<AccessibilitySnapshotCacheKey> {
3378 let source = AccessibilitySource::parse(source).ok()?;
3379 if source != AccessibilitySource::NativeAX
3380 && !(interactive_only && source == AccessibilitySource::Auto)
3381 {
3382 return None;
3383 }
3384 Some(AccessibilitySnapshotCacheKey {
3385 udid: udid.to_owned(),
3386 source: source.as_query_value().to_owned(),
3387 max_depth: max_depth.map(|depth| depth.min(80)),
3388 include_hidden,
3389 interactive_only,
3390 })
3391}
3392
3393fn spawn_accessibility_warmup(state: AppState, udid: String) {
3394 let generation = state.accessibility_cache.generation(&udid);

Calls 1

as_query_valueMethod · 0.80

Tested by

no test coverage detected