#[non_exhaustive]pub struct CorrectionResult {
pub data: Vec<u8>,
pub corrections_applied: usize,
pub corrected_positions: Vec<usize>,
}Expand description
Result of a successful BCH decode + correct attempt.
Returned by bch_correct_regular / bch_correct_long when correction
succeeds. corrections_applied == 0 means the input was already valid;
> 0 means substitutions were applied at the indicated positions.
Marked #[non_exhaustive] to allow future fields (e.g., confidence
score, syndrome metadata) without breaking downstream struct-literal
construction. Construct via the bch_correct_regular /
bch_correct_long APIs.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.data: Vec<u8>The corrected data_with_checksum slice (input may have been modified).
corrections_applied: usizeNumber of substitutions applied (0 = clean input).
corrected_positions: Vec<usize>Indices into data of the substituted positions.
Trait Implementations§
Source§impl Clone for CorrectionResult
impl Clone for CorrectionResult
Source§fn clone(&self) -> CorrectionResult
fn clone(&self) -> CorrectionResult
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 CorrectionResult
impl Debug for CorrectionResult
Source§impl PartialEq for CorrectionResult
impl PartialEq for CorrectionResult
Source§fn eq(&self, other: &CorrectionResult) -> bool
fn eq(&self, other: &CorrectionResult) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CorrectionResult
impl StructuralPartialEq for CorrectionResult
Auto Trait Implementations§
impl Freeze for CorrectionResult
impl RefUnwindSafe for CorrectionResult
impl Send for CorrectionResult
impl Sync for CorrectionResult
impl Unpin for CorrectionResult
impl UnsafeUnpin for CorrectionResult
impl UnwindSafe for CorrectionResult
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