(&self)
| 294 | |
| 295 | impl NativeBridge { |
| 296 | pub fn list_simulators(&self) -> Result<Vec<Simulator>, AppError> { |
| 297 | let json = unsafe { |
| 298 | let mut error = ptr::null_mut(); |
| 299 | let raw = ffi::xcw_native_list_simulators(&mut error); |
| 300 | string_from_raw(raw, error)? |
| 301 | }; |
| 302 | let payload: SimulatorsEnvelope = |
| 303 | serde_json::from_str(&json).map_err(|e| AppError::internal(e.to_string()))?; |
| 304 | Ok(payload.simulators) |
| 305 | } |
| 306 | |
| 307 | pub fn simulator(&self, udid: &str) -> Result<Option<Simulator>, AppError> { |
| 308 | Ok(self |
no test coverage detected