#[non_exhaustive]pub enum SimctlError {
Spawn(Error),
NonZeroExit {
subcommand: String,
argv: Vec<String>,
code: i32,
stderr: String,
wall_ms: u64,
},
Malformed {
subcommand: String,
detail: String,
},
Timeout {
subcommand: String,
ms: u64,
},
CaptureBackpressure {
retry_after: Duration,
},
}Expand description
Failure variants for any xcrun simctl invocation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Spawn(Error)
Failed to spawn the xcrun process itself (PATH lookup / fork failure).
NonZeroExit
xcrun simctl <sub> exited non-zero.
v1.0.7 §D2 — carries the full argv and wall_ms so the
Display impl surfaces every argument the consumer needs to
reproduce or file a precise upstream bug. Prior versions
reported only the subcommand name (e.g., "spawn") without
telling the caller which binary or paths simctl was asked to
touch. See .claude/rfcs/1.0.7-observability-layer.md §D2.
Fields
Malformed
xcrun simctl <sub> exited 0 but stdout didn’t match the expected shape.
Timeout
xcrun simctl <sub> did not complete within the deadline.
CaptureBackpressure
The screenshot pacer’s circuit is open — a recent screenshot
wall time exceeded the circuit threshold, or a screenshot
failed. Callers should back off for retry_after and try
again. See screenshot_pacer::ScreenshotPacer and
.claude/rfcs/1.0.4-sim-health-and-backpressure.md §D3.
Since smix 1.0.4.
Implementations§
Source§impl SimctlError
impl SimctlError
Sourcepub fn non_zero_exit(
subcommand: impl Into<String>,
code: i32,
stderr: impl Into<String>,
) -> Self
pub fn non_zero_exit( subcommand: impl Into<String>, code: i32, stderr: impl Into<String>, ) -> Self
v1.0.7 §D2 — synthetic NonZeroExit for callers translating
a foreign subprocess error into SimctlError (e.g.
AndroidDeviceControl adapting adb failures). Fills
argv = [subcommand] + wall_ms = 0; when the caller has a
real argv, prefer the struct literal.
Trait Implementations§
Source§impl Debug for SimctlError
impl Debug for SimctlError
Source§impl Display for SimctlError
impl Display for SimctlError
Source§impl Error for SimctlError
impl Error for SimctlError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()