Enum ecu_diagnostics::DiagError
source · [−]pub enum DiagError {
NotSupported,
ECUError {
code: u8,
def: Option<String>,
},
EmptyResponse,
WrongMessage,
ServerNotRunning,
InvalidResponseLength,
ParameterInvalid,
ChannelError(ChannelError),
NotImplemented(String),
HardwareError(HardwareError),
MismatchedResponse(String),
}
Expand description
Diagnostic server error
Variants
NotSupported
The Diagnostic server does not support the request
ECUError
Fields
code: u8
Raw Negative response code from ECU
Diagnostic error code from the ECU itself
EmptyResponse
Response empty
WrongMessage
ECU Responded but send a message that wasn’t a reply for the sent message
ServerNotRunning
Diagnostic server terminated!?
InvalidResponseLength
ECU Responded with a message, but the length was incorrect
ParameterInvalid
A parameter given to the function is invalid. Check the function’s documentation for more information
ChannelError(ChannelError)
Error with underlying communication channel
NotImplemented(String)
Denotes a TODO action (Non-implemented function stub) This will be removed in Version 1
HardwareError(HardwareError)
Device hardware error
MismatchedResponse(String)
ECU Param ID did not match the request, but the Service ID was correct
Trait Implementations
sourceimpl Error for DiagError
impl Error for DiagError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<ChannelError> for DiagError
impl From<ChannelError> for DiagError
sourcefn from(x: ChannelError) -> Self
fn from(x: ChannelError) -> Self
Converts to this type from the input type.
sourceimpl From<HardwareError> for DiagError
impl From<HardwareError> for DiagError
sourcefn from(x: HardwareError) -> Self
fn from(x: HardwareError) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for DiagError
impl Send for DiagError
impl Sync for DiagError
impl Unpin for DiagError
impl !UnwindSafe for DiagError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more