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

Function avd_from_id

packages/server/src/android.rs:138–143  ·  view source on GitHub ↗
(id: &str)

Source from the content-addressed store, hash-verified

136}
137
138pub fn avd_from_id(id: &str) -> Result<String, AppError> {
139 id.strip_prefix(ANDROID_ID_PREFIX)
140 .filter(|value| !value.trim().is_empty())
141 .map(ToOwned::to_owned)
142 .ok_or_else(|| AppError::bad_request(format!("Invalid Android emulator id `{id}`.")))
143}
144
145pub fn id_for_avd(avd_name: &str) -> String {
146 format!("{ANDROID_ID_PREFIX}{avd_name}")

Callers 6

bootMethod · 0.85
shutdownMethod · 0.85
eraseMethod · 0.85
wait_until_bootedMethod · 0.85
serial_for_idMethod · 0.85

Calls 1

is_emptyMethod · 0.80

Tested by

no test coverage detected