pub struct RepairProblem<'a> {
pub total_inputs: usize,
pub word_count: usize,
pub missing_indices: &'a [usize],
pub available_indices: &'a [usize],
pub recovery_exponents: &'a [u32],
pub constants: &'a [u16],
pub sources: &'a [&'a [u8]],
pub outputs: &'a mut [&'a mut [u8]],
}Expand description
A host-agnostic description of a Reed-Solomon repair reconstruct.
Sources are ordered available inputs first (in available_indices order),
then the selected recovery blocks (in recovery_exponents order) — the same
column ordering as RepairPlan::input_factors. Each source and output
region is word_count * 2 bytes; output regions are pairwise disjoint. A
solver reconstructs every outputs[j] in place, in missing_indices order.
This carries no pre-built matrix and no weaver-specific types: it is exactly
the data a host needs to (re)build the repair coefficient matrix (via
reedsolomon_rs::matrix::build_repair_matrix) and run the GF matmul.
Fields§
§total_inputs: usizeTotal input slices in the recovery set (indexes constants).
word_count: usizeu16 words per slice; each region is word_count * 2 bytes.
missing_indices: &'a [usize]Global indices of the missing slices (one per output row).
available_indices: &'a [usize]Global indices of the available input slices (source columns first).
recovery_exponents: &'a [u32]Recovery-block exponents used, one per missing slice (source columns last).
constants: &'a [u16]PAR2 input-slice constants for every input slice in the recovery set.
sources: &'a [&'a [u8]]Source byte-regions: available inputs then recovery blocks.
outputs: &'a mut [&'a mut [u8]]Output byte-regions for the reconstructed missing slices (disjoint).
Implementations§
Source§impl RepairProblem<'_>
impl RepairProblem<'_>
Sourcepub fn slice_bytes(&self) -> usize
pub fn slice_bytes(&self) -> usize
Bytes per source/output region (word_count * 2).
Auto Trait Implementations§
impl<'a> !UnwindSafe for RepairProblem<'a>
impl<'a> Freeze for RepairProblem<'a>
impl<'a> RefUnwindSafe for RepairProblem<'a>
impl<'a> Send for RepairProblem<'a>
impl<'a> Sync for RepairProblem<'a>
impl<'a> Unpin for RepairProblem<'a>
impl<'a> UnsafeUnpin for RepairProblem<'a>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more