pub enum Error {
Show 16 variants
Io {
source: Error,
},
Process {
source: ExitStatusError,
},
Transfer {
source: TransferError,
},
Borrow {
source: BorrowMutError,
},
DeviceTimeout {
backtrace: Backtrace,
device: Device,
},
Timeout {
backtrace: Backtrace,
what: String,
},
Utf {
source: Utf8Error,
},
Json {
source: Error,
},
Lfs {
source: Error,
},
Chain {
source: Box<Error>,
others: Vec<Error>,
},
DeviceSerial {
source: SerialNumberFormatError,
},
SerialPort {
source: Error,
},
NotFound(Backtrace),
NotReady(Backtrace),
WrongState(Mode),
MountNotFound(String),
}Variants§
Io
Process
Fields
§
source: ExitStatusErrorTransfer
Fields
§
source: TransferErrorBorrow
Fields
§
source: BorrowMutErrorDeviceTimeout
Timeout
Utf
Json
Lfs
Chain
DeviceSerial
Fields
§
source: SerialNumberFormatErrorSerialPort
NotFound(Backtrace)
Device discovery error.
NotReady(Backtrace)
Interface error.
WrongState(Mode)
MountNotFound(String)
Implementations§
Trait Implementations§
Source§impl Diagnostic for Error
impl Diagnostic for Error
Source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Unique diagnostic code that can be used to look up more information
about this
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.Source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Additional help text related to this
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?Source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
Diagnostic severity. This may be used by
ReportHandlers to change the display format
of this diagnostic. Read moreSource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Labels to apply to this
Diagnostic’s Diagnostic::source_codeSource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this
Diagnostic’s Diagnostic::labels to.Additional related
Diagnostics.Source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
URL to visit for a more detailed explanation/help about this
Diagnostic.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
The cause of the error.
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
Source§fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
fn provide<'_request>(&'_request self, request: &mut Request<'_request>)
🔬This is a nightly-only experimental API. (
error_generic_member_access)Provides type-based access to context intended for error reports. 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<BorrowMutError> for Error
impl From<BorrowMutError> for Error
Source§fn from(source: BorrowMutError) -> Self
fn from(source: BorrowMutError) -> Self
Converts to this type from the input type.
Source§impl From<ExitStatusError> for Error
impl From<ExitStatusError> for Error
Source§fn from(source: ExitStatusError) -> Self
fn from(source: ExitStatusError) -> Self
Converts to this type from the input type.
Source§impl From<SerialNumberFormatError> for Error
impl From<SerialNumberFormatError> for Error
Source§fn from(source: SerialNumberFormatError) -> Self
fn from(source: SerialNumberFormatError) -> Self
Converts to this type from the input type.
Source§impl From<TransferError> for Error
impl From<TransferError> for Error
Source§fn from(source: TransferError) -> Self
fn from(source: TransferError) -> Self
Converts to this type from the input type.
impl Sync for Error
Auto Trait Implementations§
impl !Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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