pub enum Error {
Io(Error),
Http(Box<Error>),
Json(Error),
LaunchTimeout,
ResetTimeout,
SpeculosExited {
status: ExitStatus,
stderr: String,
},
WaitTimeout,
TouchscreenOnly,
ButtonsOnly,
ScreenshotNotPng,
EnvMissing(String),
EnvInvalid {
var: String,
reason: String,
},
}Variants§
Io(Error)
I/O error spawning or talking to the child / REST API.
Http(Box<Error>)
HTTP transport error (connection refused, timeout, etc).
Json(Error)
Failed to deserialize a REST response body.
LaunchTimeout
Speculos did not become responsive within the launch timeout.
ResetTimeout
reset() POST sent, but /events did not become responsive again
within the timeout.
SpeculosExited
The speculos child process exited before becoming ready.
WaitTimeout
wait_for did not see a matching event within the timeout.
TouchscreenOnly
press() was called on a touchscreen model.
ButtonsOnly
tap() / drag() / press_at() / release_at() / move_to() was
called on a button-only model.
ScreenshotNotPng
screenshot() returned a body that is not a PNG.
EnvMissing(String)
A required environment variable is not set.
EnvInvalid
An environment variable (or model string) could not be parsed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more