pub enum Error {
NoBleAdaptor,
NoControlPoint,
NoDevice,
NotConnected,
NoDataType,
CharacteristicNotFound,
InvalidData,
InvalidLength,
NullCommand,
WrongResponse,
WrongType,
BleError(Error),
}Expand description
Error type for general errors and Ble errors from btleplug
Variants§
NoBleAdaptor
Not bluetooth adapter found when trying to scan
NoControlPoint
Could not create control point link
NoDevice
Could not find a device when trying to connect
NotConnected
Device is not connected, but function was called that requires it
NoDataType
No measurement type selected
CharacteristicNotFound
Device is missing a characteristic that was used
InvalidData
Data packets received from device could not be parsed
InvalidLength
Not enough data was received
NullCommand
Command to write to PMD control point is Null
WrongResponse
Tried to create a struct using the wrong control point response
WrongType
Tried to set a setting using with a H10MeasurementType that doesn’t support that feature
BleError(Error)
An error occurred in the underlying BLE library
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()
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