pub enum ADBError {
CommandError(String),
DeviceError(String),
FileError(String),
ConfigError(String),
TimeoutError {
message: String,
duration: Duration,
},
DeviceNotFound(String),
AppNotFound(String),
PermissionDenied(String),
ConnectionError(String),
ParseError(String),
UnknownError(String),
}
Expand description
ADB 操作相关的错误类型
Variants§
CommandError(String)
ADB 命令执行错误
DeviceError(String)
设备通信错误
FileError(String)
文件操作错误
ConfigError(String)
配置错误
TimeoutError
超时错误
DeviceNotFound(String)
设备不存在
AppNotFound(String)
应用不存在
PermissionDenied(String)
权限不足
ConnectionError(String)
连接错误
ParseError(String)
解析错误
UnknownError(String)
未知错误
Trait Implementations§
Source§impl Error for ADBError
impl Error for ADBError
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()
Source§impl From<ParseIntError> for ADBError
impl From<ParseIntError> for ADBError
Source§fn from(error: ParseIntError) -> Self
fn from(error: ParseIntError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ADBError
impl RefUnwindSafe for ADBError
impl Send for ADBError
impl Sync for ADBError
impl Unpin for ADBError
impl UnwindSafe 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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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