pub enum Error<SerialError> {
Init,
SerialPort(SerialError),
DelayError,
FailedAck,
Connection,
ModuleError(ModuleError),
Unknown,
BrokenMessage,
UserTimeout,
BadParameter,
}
Expand description
Errors that can occur when operating the DFPlayer
Variants§
Init
Initialization failed
SerialPort(SerialError)
Serial port communication error
DelayError
Delay implementation failed
FailedAck
Command was not acknowledged when feedback was enabled
Connection
Connection to the module was lost
ModuleError(ModuleError)
Error reported by the module itself
Unknown
Unknown error occurred
BrokenMessage
Received message was corrupted or incomplete
UserTimeout
Operation timed out
BadParameter
Command parameter was invalid
Trait Implementations§
impl<SerialError: Copy> Copy for Error<SerialError>
Auto Trait Implementations§
impl<SerialError> Freeze for Error<SerialError>where
SerialError: Freeze,
impl<SerialError> RefUnwindSafe for Error<SerialError>where
SerialError: RefUnwindSafe,
impl<SerialError> Send for Error<SerialError>where
SerialError: Send,
impl<SerialError> Sync for Error<SerialError>where
SerialError: Sync,
impl<SerialError> Unpin for Error<SerialError>where
SerialError: Unpin,
impl<SerialError> UnwindSafe for Error<SerialError>where
SerialError: UnwindSafe,
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