pub enum AdbError {
Adb(String),
Timeout(String),
Connection(String),
Install {
reason: String,
output: String,
},
Sync(String),
Io(Error),
}Expand description
All adb errors. Mirrors the Python exception hierarchy, which is flat under
AdbError; here the variants distinguish the former subclasses.
Variants§
Adb(String)
Generic adb error carrying the server-reported message (AdbError).
Timeout(String)
Timeout communicating with the adb server (AdbTimeout).
Connection(String)
Connection error talking to the adb server (AdbConnectionError).
Install
APK install failure (AdbInstallError). reason is parsed from the
Failure [REASON] marker in the pm install output.
Sync(String)
Sync sub-protocol error (AdbSyncError).
Io(Error)
Underlying IO error.
Implementations§
Source§impl AdbError
impl AdbError
Sourcepub fn adb(msg: impl Into<String>) -> Self
pub fn adb(msg: impl Into<String>) -> Self
Build an AdbError::Adb from anything stringy.
Sourcepub fn install(output: impl Into<String>) -> Self
pub fn install(output: impl Into<String>) -> Self
Parse pm install output into an AdbError::Install, extracting the
bracketed reason from a Failure [REASON] line (default "Unknown").
Mirrors AdbInstallError.__init__ (errors.py:24).
Trait Implementations§
Source§impl Error for AdbError
impl Error for AdbError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for AdbError
impl !UnwindSafe for AdbError
impl Freeze for AdbError
impl Send for AdbError
impl Sync for AdbError
impl Unpin for AdbError
impl UnsafeUnpin for AdbError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more