Enum Error

Source
pub enum Error {
    Output {
        stdout: String,
        stderr: String,
        status: ExitStatus,
    },
    Io(Error),
    Json(Error),
    Utf8(FromUtf8Error),
}
Expand description

Error that is returned when the CLI does not successfully complete a request, or when the library encountered a problem while generating the request or while interpreting its response.

Variants§

§

Output

This error is returned when the CLI exits with a non-zero exit code.

Fields

§stdout: String

Contains the output written to stdout before the CLI exited with a non-zero exit code.

§stderr: String

Contains the output written to stderr before the CLI exited with a non-zero exit code.

§status: ExitStatus

Contains the exit status.

§

Io(Error)

This error is returned when the library failed spawning a new process that runs the CLI. Most likely, this is caused by an incorrect Xcode path. If the Xcode path was set automatically, Xcode is probably not installed. If the Xcode path was set manually, it’s probably incorrect. Make sure that it ends with Xcode(-*).app (where * can be an optional suffix to distinguish between stable and beta).

§

Json(Error)

This error is returned when the library failed to deserialize the response of simctl list -j (in crate::list) or when it failed to serialize a request for simctl push (in crate::push).

§

Utf8(FromUtf8Error)

This error is returned when the library failed to interpret the CLI’s response as a UTF-8 encoded string.

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Error

Source§

fn from(error: FromUtf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.