Skip to main content

FailureCode

Enum FailureCode 

Source
#[non_exhaustive]
pub enum FailureCode { ElementNotFound, NotVisible, NotEnabled, Ambiguous, Timeout, AssertionFailed, AppNotRunning, SimulatorNotBooted, TapMissed, CoordinateSpaceMismatch, DriverError, }
Expand description

All failure codes smix surfaces back to the SDK / MCP / CLI (SCREAMING_SNAKE_CASE wire).

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ElementNotFound

Selector matched zero elements in the visible tree.

§

NotVisible

Element matched but failed the visibility filter.

§

NotEnabled

Element matched but enabled = false.

§

Ambiguous

Selector matched multiple elements (when uniqueness was required).

§

Timeout

Operation exceeded the implicit-wait budget.

§

AssertionFailed

expect assertion (e.g. toHaveText) did not hold.

§

AppNotRunning

Target app exited or never launched.

§

SimulatorNotBooted

Simulator device is not booted.

§

TapMissed

The touch was synthesised, and it did not land inside the element the selector matched.

Distinct from ElementNotFound because the two send a reader somewhere different: not-found means fix the selector, missed means the element was there and the touch went elsewhere — a stale frame, or something moved between the tree fetch and the tap.

§

CoordinateSpaceMismatch

The screen is described in one coordinate space and the touch would be delivered in another, so no aim can land where the tree says the element is.

Distinct from TapMissed, and the distinction is the whole point: a miss says the element was there and the touch went elsewhere, which invites another attempt with a better point. There is no better point here — whatever is passed gets recomputed against the app’s frame and then read against the device’s. Retrying is the trap, and the consumer who found this spent an afternoon in it.

§

DriverError

Catch-all for runner / driver / IO failures.

Trait Implementations§

Source§

impl Clone for FailureCode

Source§

fn clone(&self) -> FailureCode

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for FailureCode

Source§

impl Debug for FailureCode

Source§

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

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

impl<'de> Deserialize<'de> for FailureCode

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for FailureCode

Source§

impl Hash for FailureCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for FailureCode

Source§

fn eq(&self, other: &FailureCode) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FailureCode

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FailureCode

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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.