#[non_exhaustive]pub enum Error {
Show 22 variants
SerialDeviceInUseOrDisconnected(SerialDeviceInUseOrDisconnectedError),
Io(Error),
TryIntoSend(TryIntoSendError),
AsciiPacketMissingStart(AsciiPacketMissingStartError),
AsciiPacketMissingEnd(AsciiPacketMissingEndError),
AsciiPacketMalformed(AsciiPacketMalformedError),
AsciiInvalidChecksum(AsciiInvalidChecksumError),
AsciiUnexpectedResponse(AsciiUnexpectedResponseError),
AsciiUnexpectedPacket(AsciiUnexpectedPacketError),
AsciiCheckFlag(AsciiCheckFlagError),
AsciiCheckStatus(AsciiCheckStatusError<AnyResponse>),
AsciiCheckWarning(AsciiCheckWarningError<AnyResponse>),
AsciiCheckData(AsciiCheckDataError<AnyResponse>),
AsciiCheckCustom(AsciiCheckCustomError<AnyResponse>),
AsciiCommandSplit(AsciiCommandSplitError),
AsciiReservedCharacter(AsciiReservedCharacterError),
BinaryCommandFailure(BinaryCommandFailureError),
BinaryUnexpectedTarget(BinaryUnexpectedTargetError),
BinaryUnexpectedId(BinaryUnexpectedIdError),
BinaryUnexpectedCommand(BinaryUnexpectedCommandError),
Conversion(ConversionError),
DuplicateAddress(DuplicateAddressError),
}Available on crate features
ascii and binary only.Expand description
Any error returned by this library.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SerialDeviceInUseOrDisconnected(SerialDeviceInUseOrDisconnectedError)
Io(Error)
TryIntoSend(TryIntoSendError)
AsciiPacketMissingStart(AsciiPacketMissingStartError)
AsciiPacketMissingEnd(AsciiPacketMissingEndError)
AsciiPacketMalformed(AsciiPacketMalformedError)
AsciiInvalidChecksum(AsciiInvalidChecksumError)
AsciiUnexpectedResponse(AsciiUnexpectedResponseError)
AsciiUnexpectedPacket(AsciiUnexpectedPacketError)
AsciiCheckFlag(AsciiCheckFlagError)
AsciiCheckStatus(AsciiCheckStatusError<AnyResponse>)
AsciiCheckWarning(AsciiCheckWarningError<AnyResponse>)
AsciiCheckData(AsciiCheckDataError<AnyResponse>)
AsciiCheckCustom(AsciiCheckCustomError<AnyResponse>)
AsciiCommandSplit(AsciiCommandSplitError)
AsciiReservedCharacter(AsciiReservedCharacterError)
BinaryCommandFailure(BinaryCommandFailureError)
BinaryUnexpectedTarget(BinaryUnexpectedTargetError)
BinaryUnexpectedId(BinaryUnexpectedIdError)
BinaryUnexpectedCommand(BinaryUnexpectedCommandError)
Conversion(ConversionError)
DuplicateAddress(DuplicateAddressError)
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<!> for Error
impl From<!> for Error
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckCustomError<AnyResponse>> for Error
impl From<AsciiCheckCustomError<AnyResponse>> for Error
Source§fn from(other: AsciiCheckCustomError<AnyResponse>) -> Self
fn from(other: AsciiCheckCustomError<AnyResponse>) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckDataError<AnyResponse>> for Error
impl From<AsciiCheckDataError<AnyResponse>> for Error
Source§fn from(other: AsciiCheckDataError<AnyResponse>) -> Self
fn from(other: AsciiCheckDataError<AnyResponse>) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckError<AnyResponse>> for Error
impl From<AsciiCheckError<AnyResponse>> for Error
Source§fn from(other: AsciiCheckError<AnyResponse>) -> Self
fn from(other: AsciiCheckError<AnyResponse>) -> Self
Converts to this type from the input type.
Source§impl<R> From<AsciiCheckError<R>> for Error
impl<R> From<AsciiCheckError<R>> for Error
Source§fn from(other: AsciiCheckError<R>) -> Self
fn from(other: AsciiCheckError<R>) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckFlagError> for Error
impl From<AsciiCheckFlagError> for Error
Source§fn from(other: AsciiCheckFlagError) -> Self
fn from(other: AsciiCheckFlagError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckStatusError<AnyResponse>> for Error
impl From<AsciiCheckStatusError<AnyResponse>> for Error
Source§fn from(other: AsciiCheckStatusError<AnyResponse>) -> Self
fn from(other: AsciiCheckStatusError<AnyResponse>) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCheckWarningError<AnyResponse>> for Error
impl From<AsciiCheckWarningError<AnyResponse>> for Error
Source§fn from(other: AsciiCheckWarningError<AnyResponse>) -> Self
fn from(other: AsciiCheckWarningError<AnyResponse>) -> Self
Converts to this type from the input type.
Source§impl From<AsciiCommandSplitError> for Error
impl From<AsciiCommandSplitError> for Error
Source§fn from(other: AsciiCommandSplitError) -> Self
fn from(other: AsciiCommandSplitError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiError> for Error
impl From<AsciiError> for Error
Source§fn from(other: AsciiError) -> Self
fn from(other: AsciiError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiInvalidChecksumError> for Error
impl From<AsciiInvalidChecksumError> for Error
Source§fn from(other: AsciiInvalidChecksumError) -> Self
fn from(other: AsciiInvalidChecksumError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiPacketMalformedError> for Error
impl From<AsciiPacketMalformedError> for Error
Source§fn from(other: AsciiPacketMalformedError) -> Self
fn from(other: AsciiPacketMalformedError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiPacketMissingEndError> for Error
impl From<AsciiPacketMissingEndError> for Error
Source§fn from(other: AsciiPacketMissingEndError) -> Self
fn from(other: AsciiPacketMissingEndError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiPacketMissingStartError> for Error
impl From<AsciiPacketMissingStartError> for Error
Source§fn from(other: AsciiPacketMissingStartError) -> Self
fn from(other: AsciiPacketMissingStartError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiProtocolError> for Error
impl From<AsciiProtocolError> for Error
Source§fn from(other: AsciiProtocolError) -> Self
fn from(other: AsciiProtocolError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiReservedCharacterError> for Error
impl From<AsciiReservedCharacterError> for Error
Source§fn from(other: AsciiReservedCharacterError) -> Self
fn from(other: AsciiReservedCharacterError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiUnexpectedPacketError> for Error
impl From<AsciiUnexpectedPacketError> for Error
Source§fn from(other: AsciiUnexpectedPacketError) -> Self
fn from(other: AsciiUnexpectedPacketError) -> Self
Converts to this type from the input type.
Source§impl From<AsciiUnexpectedResponseError> for Error
impl From<AsciiUnexpectedResponseError> for Error
Source§fn from(other: AsciiUnexpectedResponseError) -> Self
fn from(other: AsciiUnexpectedResponseError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryCommandFailureError> for Error
impl From<BinaryCommandFailureError> for Error
Source§fn from(other: BinaryCommandFailureError) -> Self
fn from(other: BinaryCommandFailureError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryError> for Error
impl From<BinaryError> for Error
Source§fn from(other: BinaryError) -> Self
fn from(other: BinaryError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryUnexpectedCommandError> for Error
impl From<BinaryUnexpectedCommandError> for Error
Source§fn from(other: BinaryUnexpectedCommandError) -> Self
fn from(other: BinaryUnexpectedCommandError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryUnexpectedError> for Error
impl From<BinaryUnexpectedError> for Error
Source§fn from(other: BinaryUnexpectedError) -> Self
fn from(other: BinaryUnexpectedError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryUnexpectedIdError> for Error
impl From<BinaryUnexpectedIdError> for Error
Source§fn from(other: BinaryUnexpectedIdError) -> Self
fn from(other: BinaryUnexpectedIdError) -> Self
Converts to this type from the input type.
Source§impl From<BinaryUnexpectedTargetError> for Error
impl From<BinaryUnexpectedTargetError> for Error
Source§fn from(other: BinaryUnexpectedTargetError) -> Self
fn from(other: BinaryUnexpectedTargetError) -> Self
Converts to this type from the input type.
Source§impl From<ConversionError> for Error
impl From<ConversionError> for Error
Source§fn from(other: ConversionError) -> Self
fn from(other: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<DuplicateAddressError> for Error
impl From<DuplicateAddressError> for Error
Source§fn from(other: DuplicateAddressError) -> Self
fn from(other: DuplicateAddressError) -> Self
Converts to this type from the input type.
Source§impl From<SerialDeviceInUseOrDisconnectedError> for Error
impl From<SerialDeviceInUseOrDisconnectedError> for Error
Source§fn from(other: SerialDeviceInUseOrDisconnectedError) -> Self
fn from(other: SerialDeviceInUseOrDisconnectedError) -> Self
Converts to this type from the input type.
Source§impl From<TryIntoSendError> for Error
impl From<TryIntoSendError> for Error
Source§fn from(other: TryIntoSendError) -> Self
fn from(other: TryIntoSendError) -> Self
Converts to this type from the input type.
Source§impl TryFrom<Error> for TryIntoSendError
impl TryFrom<Error> for TryIntoSendError
Source§impl TryFrom<Error> for AsciiPacketMissingStartError
impl TryFrom<Error> for AsciiPacketMissingStartError
Source§impl TryFrom<Error> for AsciiPacketMissingEndError
impl TryFrom<Error> for AsciiPacketMissingEndError
Source§impl TryFrom<Error> for AsciiPacketMalformedError
impl TryFrom<Error> for AsciiPacketMalformedError
Source§impl TryFrom<Error> for AsciiInvalidChecksumError
impl TryFrom<Error> for AsciiInvalidChecksumError
Source§impl TryFrom<Error> for AsciiUnexpectedResponseError
impl TryFrom<Error> for AsciiUnexpectedResponseError
Source§impl TryFrom<Error> for AsciiUnexpectedPacketError
impl TryFrom<Error> for AsciiUnexpectedPacketError
Source§impl TryFrom<Error> for AsciiCheckFlagError
impl TryFrom<Error> for AsciiCheckFlagError
Source§impl TryFrom<Error> for AsciiCheckStatusError<AnyResponse>
impl TryFrom<Error> for AsciiCheckStatusError<AnyResponse>
Source§impl TryFrom<Error> for AsciiCheckWarningError<AnyResponse>
impl TryFrom<Error> for AsciiCheckWarningError<AnyResponse>
Source§impl TryFrom<Error> for AsciiCheckDataError<AnyResponse>
impl TryFrom<Error> for AsciiCheckDataError<AnyResponse>
Source§impl TryFrom<Error> for AsciiCheckCustomError<AnyResponse>
impl TryFrom<Error> for AsciiCheckCustomError<AnyResponse>
Source§impl TryFrom<Error> for AsciiCommandSplitError
impl TryFrom<Error> for AsciiCommandSplitError
Source§impl TryFrom<Error> for AsciiReservedCharacterError
impl TryFrom<Error> for AsciiReservedCharacterError
Source§impl TryFrom<Error> for BinaryCommandFailureError
impl TryFrom<Error> for BinaryCommandFailureError
Source§impl TryFrom<Error> for BinaryUnexpectedTargetError
impl TryFrom<Error> for BinaryUnexpectedTargetError
Source§impl TryFrom<Error> for BinaryUnexpectedIdError
impl TryFrom<Error> for BinaryUnexpectedIdError
Source§impl TryFrom<Error> for BinaryUnexpectedCommandError
impl TryFrom<Error> for BinaryUnexpectedCommandError
Source§impl TryFrom<Error> for ConversionError
impl TryFrom<Error> for ConversionError
Source§impl TryFrom<Error> for DuplicateAddressError
impl TryFrom<Error> for DuplicateAddressError
Source§impl TryFrom<Error> for AsciiProtocolError
impl TryFrom<Error> for AsciiProtocolError
Source§impl TryFrom<Error> for AsciiError
impl TryFrom<Error> for AsciiError
Source§impl TryFrom<Error> for BinaryUnexpectedError
impl TryFrom<Error> for BinaryUnexpectedError
Source§impl TryFrom<Error> for BinaryError
impl TryFrom<Error> for BinaryError
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