pub enum Error {
UnexpectedEof,
Expected(&'static str),
InvalidChar(char),
MaxStrLength(usize),
Version(&'static str),
Message(&'static str),
Receivers(&'static str),
Nodes(&'static str),
Signal(&'static str),
Decoding(&'static str),
Validation(&'static str),
}Expand description
Error type for DBC operations.
This enum represents all possible errors that can occur when working with DBC files.
Variants§
UnexpectedEof
Unexpected end of input encountered.
Expected(&'static str)
Expected a specific token or value.
InvalidChar(char)
Invalid character encountered.
MaxStrLength(usize)
String length exceeds the maximum allowed length.
Version(&'static str)
Version-related error.
Message(&'static str)
Message-related error.
Receivers(&'static str)
Receivers-related error.
Nodes(&'static str)
Nodes-related error.
Signal(&'static str)
Signal-related error.
Decoding(&'static str)
Decoding-related error.
Validation(&'static str)
Validation-related error.
Implementations§
Source§impl Error
impl Error
pub const UNEXPECTED_EOF: &'static str = lang::UNEXPECTED_EOF
pub const EXPECTED_WHITESPACE: &'static str = lang::EXPECTED_WHITESPACE
pub const EXPECTED_PATTERN: &'static str = lang::EXPECTED_PATTERN
pub const EXPECTED_KEYWORD: &'static str = lang::EXPECTED_KEYWORD
pub const EXPECTED_NUMBER: &'static str = lang::EXPECTED_NUMBER
pub const EXPECTED_IDENTIFIER: &'static str = lang::EXPECTED_IDENTIFIER
pub const INVALID_UTF8: &'static str = lang::INVALID_UTF8
pub const INVALID_NUMBER_FORMAT: &'static str = lang::INVALID_NUMBER_FORMAT
pub const PARSE_NUMBER_FAILED: &'static str = lang::PARSE_NUMBER_FAILED
pub const INVALID_CHARACTER: &'static str = lang::INVALID_CHARACTER
pub const STRING_LENGTH_EXCEEDS_MAX: &'static str = lang::STRING_LENGTH_EXCEEDS_MAX
pub const MAX_NAME_SIZE_EXCEEDED: &'static str = lang::MAX_NAME_SIZE_EXCEEDED
pub const DECODING_ERROR_PREFIX: &'static str = lang::DECODING_ERROR_PREFIX
pub const VALIDATION_ERROR_PREFIX: &'static str = lang::VALIDATION_ERROR_PREFIX
pub const VERSION_ERROR_PREFIX: &'static str = lang::VERSION_ERROR_PREFIX
pub const MESSAGE_ERROR_PREFIX: &'static str = lang::MESSAGE_ERROR_PREFIX
pub const RECEIVERS_ERROR_PREFIX: &'static str = lang::RECEIVERS_ERROR_PREFIX
pub const NODES_ERROR_PREFIX: &'static str = lang::NODES_ERROR_PREFIX
pub const SIGNAL_ERROR_PREFIX: &'static str = lang::SIGNAL_ERROR_PREFIX
pub const SIGNAL_PARSE_INVALID_START_BIT: &'static str = lang::SIGNAL_PARSE_INVALID_START_BIT
pub const SIGNAL_PARSE_INVALID_LENGTH: &'static str = lang::SIGNAL_PARSE_INVALID_LENGTH
pub const SIGNAL_PARSE_INVALID_FACTOR: &'static str = lang::SIGNAL_PARSE_INVALID_FACTOR
pub const SIGNAL_PARSE_INVALID_OFFSET: &'static str = lang::SIGNAL_PARSE_INVALID_OFFSET
pub const SIGNAL_PARSE_INVALID_MIN: &'static str = lang::SIGNAL_PARSE_INVALID_MIN
pub const SIGNAL_PARSE_INVALID_MAX: &'static str = lang::SIGNAL_PARSE_INVALID_MAX
pub const SIGNAL_PARSE_UNIT_TOO_LONG: &'static str = lang::SIGNAL_PARSE_UNIT_TOO_LONG
pub const SIGNAL_NAME_EMPTY: &'static str = lang::SIGNAL_NAME_EMPTY
pub const SIGNAL_LENGTH_TOO_SMALL: &'static str = lang::SIGNAL_LENGTH_TOO_SMALL
pub const SIGNAL_LENGTH_TOO_LARGE: &'static str = lang::SIGNAL_LENGTH_TOO_LARGE
pub const SIGNAL_LENGTH_REQUIRED: &'static str = lang::SIGNAL_LENGTH_REQUIRED
pub const SIGNAL_START_BIT_REQUIRED: &'static str = lang::SIGNAL_START_BIT_REQUIRED
pub const SIGNAL_BYTE_ORDER_REQUIRED: &'static str = lang::SIGNAL_BYTE_ORDER_REQUIRED
pub const SIGNAL_UNSIGNED_REQUIRED: &'static str = lang::SIGNAL_UNSIGNED_REQUIRED
pub const SIGNAL_FACTOR_REQUIRED: &'static str = lang::SIGNAL_FACTOR_REQUIRED
pub const SIGNAL_OFFSET_REQUIRED: &'static str = lang::SIGNAL_OFFSET_REQUIRED
pub const SIGNAL_MIN_REQUIRED: &'static str = lang::SIGNAL_MIN_REQUIRED
pub const SIGNAL_MAX_REQUIRED: &'static str = lang::SIGNAL_MAX_REQUIRED
pub const SIGNAL_OVERLAP: &'static str = lang::SIGNAL_OVERLAP
pub const SIGNAL_EXTENDS_BEYOND_MESSAGE: &'static str = lang::SIGNAL_EXTENDS_BEYOND_MESSAGE
pub const SIGNAL_EXTENDS_BEYOND_DATA: &'static str = lang::SIGNAL_EXTENDS_BEYOND_DATA
pub const SIGNAL_RECEIVERS_TOO_MANY: &'static str = lang::SIGNAL_RECEIVERS_TOO_MANY
pub const NODES_DUPLICATE_NAME: &'static str = lang::NODES_DUPLICATE_NAME
pub const NODES_TOO_MANY: &'static str = lang::NODES_TOO_MANY
pub const DUPLICATE_MESSAGE_ID: &'static str = lang::DUPLICATE_MESSAGE_ID
pub const SENDER_NOT_IN_NODES: &'static str = lang::SENDER_NOT_IN_NODES
pub const INVALID_RANGE: &'static str = lang::INVALID_RANGE
pub const MESSAGE_TOO_MANY_SIGNALS: &'static str = lang::MESSAGE_TOO_MANY_SIGNALS
pub const EXTENDED_MULTIPLEXING_TOO_MANY: &'static str = lang::EXTENDED_MULTIPLEXING_TOO_MANY
pub const MESSAGE_NAME_EMPTY: &'static str = lang::MESSAGE_NAME_EMPTY
pub const MESSAGE_SENDER_EMPTY: &'static str = lang::MESSAGE_SENDER_EMPTY
pub const MESSAGE_DLC_TOO_SMALL: &'static str = lang::MESSAGE_DLC_TOO_SMALL
pub const MESSAGE_DLC_TOO_LARGE: &'static str = lang::MESSAGE_DLC_TOO_LARGE
pub const MESSAGE_DLC_REQUIRED: &'static str = lang::MESSAGE_DLC_REQUIRED
pub const MESSAGE_ID_OUT_OF_RANGE: &'static str = lang::MESSAGE_ID_OUT_OF_RANGE
pub const MESSAGE_ID_REQUIRED: &'static str = lang::MESSAGE_ID_REQUIRED
pub const MESSAGE_INVALID_ID: &'static str = lang::MESSAGE_INVALID_ID
pub const MESSAGE_INVALID_DLC: &'static str = lang::MESSAGE_INVALID_DLC
pub const MESSAGE_NOT_FOUND: &'static str = lang::MESSAGE_NOT_FOUND
pub const PAYLOAD_LENGTH_MISMATCH: &'static str = lang::PAYLOAD_LENGTH_MISMATCH
pub const MULTIPLEXER_SWITCH_NEGATIVE: &'static str = lang::MULTIPLEXER_SWITCH_NEGATIVE
pub const RECEIVERS_DUPLICATE_NAME: &'static str = lang::RECEIVERS_DUPLICATE_NAME
pub const VALUE_DESCRIPTION_MESSAGE_NOT_FOUND: &'static str = lang::VALUE_DESCRIPTION_MESSAGE_NOT_FOUND
pub const VALUE_DESCRIPTION_SIGNAL_NOT_FOUND: &'static str = lang::VALUE_DESCRIPTION_SIGNAL_NOT_FOUND
pub const VALUE_DESCRIPTIONS_TOO_MANY: &'static str = lang::VALUE_DESCRIPTIONS_TOO_MANY
Trait Implementations§
Source§impl Error for Error
Available on crate feature std only.
impl Error for Error
Available on crate feature
std only.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§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 Error
impl From<ParseIntError> for Error
Source§fn from(_err: ParseIntError) -> Self
fn from(_err: ParseIntError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)