pub struct SimRegistry { /* private fields */ }Expand description
Loaded view of .smix/sims.json, keyed by alias.
Implementations§
Source§impl SimRegistry
impl SimRegistry
Sourcepub fn load(path: &Path) -> Result<Self, RegistryError>
pub fn load(path: &Path) -> Result<Self, RegistryError>
Parse the registry file at path.
Sourcepub fn discover(start: &Path) -> Option<PathBuf>
pub fn discover(start: &Path) -> Option<PathBuf>
Walk up from start looking for .smix/sims.json.
Sourcepub fn resolve(&self, device_ref: &str) -> Result<String, RegistryError>
pub fn resolve(&self, device_ref: &str) -> Result<String, RegistryError>
Resolve a device ref to a UDID.
An explicit UDID passes through (normalized to uppercase) whether
or not it is registered — UDID-form input is always a deliberate
instruction. Otherwise the ref must match an alias key or a
deviceName exactly; anything else errors listing what exists.
Sourcepub fn sims(&self) -> &BTreeMap<String, RegisteredSim>
pub fn sims(&self) -> &BTreeMap<String, RegisteredSim>
All registered sims, keyed by alias.
Sourcepub fn lookup(&self, device_ref: &str) -> Option<&RegisteredSim>
pub fn lookup(&self, device_ref: &str) -> Option<&RegisteredSim>
v6.10 c2 — look up a RegisteredSim by alias key, device name,
or UDID. Returns None if no entry matches any of the three.
Mirrors Self::resolve’s match precedence so cli callers can
fetch the full spec (e.g. locale field) after they already
resolved the UDID.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimRegistry
impl RefUnwindSafe for SimRegistry
impl Send for SimRegistry
impl Sync for SimRegistry
impl Unpin for SimRegistry
impl UnsafeUnpin for SimRegistry
impl UnwindSafe for SimRegistry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more