#[non_exhaustive]pub enum Error {
Show 14 variants
AppNotFound(String),
AmbiguousApp {
query: String,
candidates: Vec<AppInfo>,
},
AmbiguousWindow {
title: String,
candidates: Vec<WindowInfo>,
},
WindowNotFound(String),
NoAppState(String),
ElementNotFound {
app: String,
index: usize,
},
InvalidArgument(String),
PermissionDenied(Permission),
Unsupported(String),
ActionFailed(String),
StateUnavailable(String),
Platform(String),
Image(ImageError),
Io(Error),
}Expand description
Everything that can go wrong while observing or driving an app.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
AppNotFound(String)
No running or installed app matched the query.
AmbiguousApp
Several running apps matched the query equally well.
AmbiguousWindow
Several of an app’s windows matched a title.
WindowNotFound(String)
The app is running but has no window that can be observed.
NoAppState(String)
An action referenced app state that was never captured (or was discarded).
ElementNotFound
An element index did not exist in the latest captured state.
InvalidArgument(String)
A caller-supplied argument was invalid.
PermissionDenied(Permission)
A required OS permission has not been granted to this process.
Unsupported(String)
The operation is not available on this platform or backend.
ActionFailed(String)
The platform accepted the request but reported that it failed.
The state the action needs is missing (for example, no screenshot was captured).
Platform(String)
A platform API returned an unexpected error.
Image(ImageError)
Encoding a screenshot failed.
Io(Error)
An I/O error, for example while launching an app.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()