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

Function any_foreground_client_for_udid

packages/server/src/api/routes.rs:305–318  ·  view source on GitHub ↗
(
    clients: &HashMap<(String, String), StreamClientForegroundState>,
    udid: &str,
)

Source from the content-addressed store, hash-verified

303}
304
305fn any_foreground_client_for_udid(
306 clients: &HashMap<(String, String), StreamClientForegroundState>,
307 udid: &str,
308) -> Option<bool> {
309 let mut saw_client = false;
310 let mut saw_foreground = false;
311 for ((client_udid, _), state) in clients {
312 if client_udid == udid {
313 saw_client = true;
314 saw_foreground |= state.foreground;
315 }
316 }
317 saw_client.then_some(saw_foreground)
318}
319
320#[derive(Clone, Default)]
321pub struct SimulatorInventoryCache {

Callers 2

recordMethod · 0.85
removeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected