pub enum Ds18b20Error {
Show 13 variants
SensorIdNotFound(String, String),
ReadToStringFailure(String),
InsufficientLinesInFile(String),
Line0NotEndingWithYes(String),
TemperatureEntryNotFound(String),
UnidentifiedError(String),
TemperatureParseError(String),
TemperatureOutOfRange(String),
SystemDriverBasePathEmpty(String),
SystemDriverSensorPathEmpty(String),
SystemDriverFileNameEmpty(String),
NoSensorIdProvided(String),
SensorIdsIdentical(String),
}Variants§
SensorIdNotFound(String, String)
Indicates that a DS18B20 sensor with the specified ID could not be found on the 1-Wire bus.
ReadToStringFailure(String)
Represents a failure to read the entire content of the sensor’s device file into a string.
InsufficientLinesInFile(String)
Occurs when the sensor’s device file does not contain the expected two lines of data.
Line0NotEndingWithYes(String)
The first line from the sensor file must end with ’ YES’ to confirm a successful CRC check. This error means the check failed, indicating a data transmission error.
TemperatureEntryNotFound(String)
The second line of the sensor file is expected to contain a temperature value prefixed with ‘t=’. This error indicates the prefix was not found.
UnidentifiedError(String)
A generic error for cases that do not fit any other specific error variant.
TemperatureParseError(String)
The temperature value found in the sensor file could not be successfully parsed into a numeric type.
TemperatureOutOfRange(String)
The parsed temperature value is outside the plausible range for an aquarium, suggesting a sensor malfunction or reading error.
SystemDriverBasePathEmpty(String)
System driver base path prefix is empty.
SystemDriverSensorPathEmpty(String)
System driver sensor path prefix is empty.
SystemDriverFileNameEmpty(String)
System driver file name is empty.
NoSensorIdProvided(String)
No water temperature sensor ID nor ambient temperature sensor ID provided.
SensorIdsIdentical(String)
Ambient and water temperature sensor IDs are identical.
Trait Implementations§
Source§impl Clone for Ds18b20Error
impl Clone for Ds18b20Error
Source§fn clone(&self) -> Ds18b20Error
fn clone(&self) -> Ds18b20Error
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more