pub enum LongEccHeaderFromBytesError {
IncorrectMagic(u16),
InvalidVersion(u8),
IncorrectChecksum,
CorrectionFailed(RSDecodeError),
InvalidMessageLength(u32, u32),
InvalidSegmentParityRatio(u8, u8),
InvalidFullLength(u32, u64),
}Expand description
Errors returned by
LongEccHeader::from_bytes.
Variants§
IncorrectMagic(u16)
The magic number does not identify a long ECC header.
InvalidVersion(u8)
The encoding version is not supported.
IncorrectChecksum
The header checksum mismatches even after error correction.
CorrectionFailed(RSDecodeError)
Propagated from correcting the header bytes with the header parity.
InvalidMessageLength(u32, u32)
The header and message do not fit within the full length.
InvalidSegmentParityRatio(u8, u8)
The parity bytes leave no room for new data within a segment.
InvalidFullLength(u32, u64)
The full length does not match the codeword length derived from the message length and segment geometry.
Trait Implementations§
Source§impl Clone for LongEccHeaderFromBytesError
impl Clone for LongEccHeaderFromBytesError
Source§fn clone(&self) -> LongEccHeaderFromBytesError
fn clone(&self) -> LongEccHeaderFromBytesError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LongEccHeaderFromBytesError
impl Debug for LongEccHeaderFromBytesError
impl Eq for LongEccHeaderFromBytesError
Source§impl Error for LongEccHeaderFromBytesError
impl Error for LongEccHeaderFromBytesError
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<LongEccHeaderFromBytesError> for LongEccHeaderFromByteSliceError
impl From<LongEccHeaderFromBytesError> for LongEccHeaderFromByteSliceError
Source§fn from(source: LongEccHeaderFromBytesError) -> Self
fn from(source: LongEccHeaderFromBytesError) -> Self
Converts to this type from the input type.
Source§impl From<RSDecodeError> for LongEccHeaderFromBytesError
impl From<RSDecodeError> for LongEccHeaderFromBytesError
Source§fn from(source: RSDecodeError) -> Self
fn from(source: RSDecodeError) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for LongEccHeaderFromBytesError
Auto Trait Implementations§
impl Freeze for LongEccHeaderFromBytesError
impl RefUnwindSafe for LongEccHeaderFromBytesError
impl Send for LongEccHeaderFromBytesError
impl Sync for LongEccHeaderFromBytesError
impl Unpin for LongEccHeaderFromBytesError
impl UnsafeUnpin for LongEccHeaderFromBytesError
impl UnwindSafe for LongEccHeaderFromBytesError
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