pub enum MotorError {
I2c(String),
Pwm(String),
Init(String),
}Expand description
Errors that can occur when interacting with a motor driver.
Variants§
I2c(String)
An I2C bus operation failed.
Pwm(String)
A PWM controller operation failed.
Init(String)
The motor driver failed to initialize.
Trait Implementations§
Source§impl Debug for MotorError
impl Debug for MotorError
Source§impl Display for MotorError
impl Display for MotorError
Source§impl Error for MotorError
impl Error for MotorError
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<MotorError> for RobotError
impl From<MotorError> for RobotError
Source§fn from(source: MotorError) -> Self
fn from(source: MotorError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Forget for MotorError
impl Freeze for MotorError
impl RefUnwindSafe for MotorError
impl Send for MotorError
impl Sync for MotorError
impl Unpin for MotorError
impl UnsafeUnpin for MotorError
impl UnwindSafe for MotorError
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