apple_clis/xcrun/simctl/launch/
output.rs1use crate::prelude::*;
2
3#[derive(Debug, Serialize)]
4#[non_exhaustive]
5#[must_use = include_doc!(must_use_cmd_output)]
6pub enum LaunchOutput {
7 #[doc = include_doc!(cmd_error)]
8 ErrorUnImplemented(String),
9
10 #[doc = include_doc!(cmd_success)]
11 SuccessUnImplemented(String),
12}
13
14impl CommandNomParsable for LaunchOutput {
15 fn success_unimplemented(str: String) -> Self {
16 Self::SuccessUnImplemented(str)
17 }
18
19 fn error_unimplemented(str: String) -> Self {
20 Self::ErrorUnImplemented(str)
21 }
22}
23
24impl PublicCommandOutput for LaunchOutput {
25 type PrimarySuccess = ();
26
27 fn success(&self) -> Result<&Self::PrimarySuccess> {
28 match self {
29 LaunchOutput::SuccessUnImplemented(_) => Ok(&()),
30 LaunchOutput::ErrorUnImplemented(_) => Err(Error::output_errored(self)),
31 }
32 }
33}