pub enum Error {
ServerUnavailable {
addr: SocketAddr,
source: Error,
},
Fail {
request: String,
message: String,
},
Io {
request: String,
source: Error,
},
Protocol {
request: String,
detail: String,
},
Invalid {
request: String,
detail: String,
},
Local {
path: PathBuf,
source: Error,
},
}Expand description
Why an adb request failed.
Variants§
Nothing accepted a connection at the server’s address.
Fail
The adb server, or adbd behind it, answered FAIL to request.
Io
The connection serving request failed or passed its deadline.
Protocol
The peer answered request with bytes the protocol does not allow.
Invalid
request cannot be sent as given.
Local
A local file to push could not be read.
Implementations§
Source§impl Error
impl Error
Sourcepub fn fail_message(&self) -> Option<&str>
pub fn fail_message(&self) -> Option<&str>
The message of a FAIL answer, such as closed for a device service
that nothing listens on.
Sourcepub fn is_timeout(&self) -> bool
pub fn is_timeout(&self) -> bool
Whether a connection passed its read or write deadline.
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)>
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<Error> for DeployError
impl From<Error> for DeployError
Source§fn from(error: Error) -> DeployError
fn from(error: Error) -> DeployError
Converts to this type from the input type.
Source§impl From<Error> for SessionError
impl From<Error> for SessionError
Source§fn from(error: Error) -> SessionError
fn from(error: Error) -> SessionError
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request