pub enum Error {
System(i32),
Custom(String),
}Expand description
Represents a runtime error.
Variants§
System(i32)
Represents a runtime error which comes from the underlying platform
(PROS, FreeRTOS, newlib, etc.). It wraps an errno value (i.e., system
error code).
Custom(String)
Represents a runtime error which comes from within Rust. It wraps an error string.
Trait Implementations§
Source§impl From<AdiAnalogError> for Error
impl From<AdiAnalogError> for Error
Source§fn from(err: AdiAnalogError) -> Self
fn from(err: AdiAnalogError) -> Self
Converts to this type from the input type.
Source§impl From<AdiDigitalInputError> for Error
impl From<AdiDigitalInputError> for Error
Source§fn from(err: AdiDigitalInputError) -> Self
fn from(err: AdiDigitalInputError) -> Self
Converts to this type from the input type.
Source§impl From<AdiDigitalOutputError> for Error
impl From<AdiDigitalOutputError> for Error
Source§fn from(err: AdiDigitalOutputError) -> Self
fn from(err: AdiDigitalOutputError) -> Self
Converts to this type from the input type.
Source§impl From<AdiEncoderError> for Error
impl From<AdiEncoderError> for Error
Source§fn from(err: AdiEncoderError) -> Self
fn from(err: AdiEncoderError) -> Self
Converts to this type from the input type.
Source§impl From<AdiGyroError> for Error
impl From<AdiGyroError> for Error
Source§fn from(err: AdiGyroError) -> Self
fn from(err: AdiGyroError) -> Self
Converts to this type from the input type.
Source§impl From<AdiUltrasonicError> for Error
impl From<AdiUltrasonicError> for Error
Source§fn from(err: AdiUltrasonicError) -> Self
fn from(err: AdiUltrasonicError) -> Self
Converts to this type from the input type.
Source§impl From<BatteryError> for Error
impl From<BatteryError> for Error
Source§fn from(err: BatteryError) -> Self
fn from(err: BatteryError) -> Self
Converts to this type from the input type.
Source§impl From<ControllerError> for Error
impl From<ControllerError> for Error
Source§fn from(err: ControllerError) -> Self
fn from(err: ControllerError) -> Self
Converts to this type from the input type.
Source§impl From<DistanceSensorError> for Error
impl From<DistanceSensorError> for Error
Source§fn from(err: DistanceSensorError) -> Self
fn from(err: DistanceSensorError) -> Self
Converts to this type from the input type.
Source§impl From<InertialSensorError> for Error
impl From<InertialSensorError> for Error
Source§fn from(err: InertialSensorError) -> Self
fn from(err: InertialSensorError) -> Self
Converts to this type from the input type.
Source§impl From<MotorError> for Error
impl From<MotorError> for Error
Source§fn from(err: MotorError) -> Self
fn from(err: MotorError) -> Self
Converts to this type from the input type.
Source§impl From<RotationSensorError> for Error
impl From<RotationSensorError> for Error
Source§fn from(err: RotationSensorError) -> Self
fn from(err: RotationSensorError) -> Self
Converts to this type from the input type.
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(err: TryFromIntError) -> Self
fn from(err: TryFromIntError) -> Self
Converts to this type from the input type.
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§
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