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

Method get_or_create_async

packages/server/src/simulators/registry.rs:113–121  ·  view source on GitHub ↗
(&self, udid: &str)

Source from the content-addressed store, hash-verified

111 }
112
113 pub async fn get_or_create_async(&self, udid: &str) -> Result<T, AppError> {
114 let registry = self.clone();
115 let udid_owned = udid.to_owned();
116 task::spawn_blocking(move || registry.get_or_create(&udid_owned))
117 .await
118 .map_err(|error| {
119 AppError::internal(format!("Failed to join session creation task: {error}"))
120 })?
121 }
122
123 pub fn remove(&self, udid: &str) {
124 self.store.remove(udid);

Calls 2

get_or_createMethod · 0.80
cloneMethod · 0.65

Tested by

no test coverage detected