pub struct CorrectionDetail {
pub chunk_index: usize,
pub position: usize,
pub was: char,
pub now: char,
}Expand description
Per-correction report emitted by decode_with_correction. One entry
per repaired character. position is 0-indexed into the codex32
data-part (i.e. the characters following the md1 HRP + separator);
was is the original (corrupted) char from the input; now is the
corrected char.
Atomic per plan §1 D28: when decode_with_correction succeeds the
returned vector aggregates corrections across all chunks; chunks that
were already valid contribute nothing.
Fields§
§chunk_index: usize0-indexed position of the chunk in the caller’s &[&str] slice.
position: usize0-indexed position of the corrected character within the chunk’s data-part (post-HRP-and-separator).
was: charThe original (corrupted) character at this position.
now: charThe corrected character at this position.
Trait Implementations§
Source§impl Clone for CorrectionDetail
impl Clone for CorrectionDetail
Source§fn clone(&self) -> CorrectionDetail
fn clone(&self) -> CorrectionDetail
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 CorrectionDetail
impl Debug for CorrectionDetail
Source§impl PartialEq for CorrectionDetail
impl PartialEq for CorrectionDetail
Source§fn eq(&self, other: &CorrectionDetail) -> bool
fn eq(&self, other: &CorrectionDetail) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for CorrectionDetail
impl StructuralPartialEq for CorrectionDetail
Auto Trait Implementations§
impl Freeze for CorrectionDetail
impl RefUnwindSafe for CorrectionDetail
impl Send for CorrectionDetail
impl Sync for CorrectionDetail
impl Unpin for CorrectionDetail
impl UnsafeUnpin for CorrectionDetail
impl UnwindSafe for CorrectionDetail
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