Skip to main content

ps_ecc/codeword/
mod.rs

1mod implementations;
2mod methods;
3
4use std::ops::Range;
5
6use crate::cow::Cow;
7
8/// A decoded codeword exposing the message bytes.
9///
10/// Dereferences to the message portion of the codeword, selected by
11/// `range`. The fields are crate-internal so that a range outside the
12/// codeword, which would make dereferencing panic, cannot be constructed
13/// by callers.
14#[derive(Debug, Hash, PartialEq, Eq)]
15pub struct Codeword<'lt> {
16    pub(crate) codeword: Cow<'lt>,
17    pub(crate) range: Range<usize>,
18}