pub enum Error {
NoError,
MoreThanOneBitCorrupted,
DataTooLong,
CorrectionFailed,
}Expand description
CRC Correction Error
Variants§
NoError
No corruption was found in the provided data. This is an error because the expectation when using CRC error correction is that the provided data has been corrupted.
MoreThanOneBitCorrupted
We currently only support error correction for one bit. This error indicates that more than one bit was corrupted in the provided data.
DataTooLong
Provided data is too long for the CrcCorrector. Make sure to set CrcCorrector::L
and crc::Algorithm appropriately.
CorrectionFailed
Failed to correct the data. This indicates a bug in the CRC or CRC correction code. It will only be returned if a correction is applied mistakenly and the integrity double-check has caught the problem. The data passed in will have been returned to its original state.
Please raise an issue on GitHub if you see this error.
Trait Implementations§
impl Eq for Error
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()