pub struct Normaliser<'a> {
pub table: &'a ByteClassTable,
pub mode: ValidationMode,
pub width: usize,
pub header: Option<&'a HeaderSpec>,
pub source: &'a str,
}Expand description
Normalises batches for one alphabet, alignment width and header format.
Fields§
§table: &'a ByteClassTableSymbol table of the resolved alphabet.
mode: ValidationModeValidation mode.
width: usizeAlignment width L (columns of the first record).
header: Option<&'a HeaderSpec>Header format, if metadata are parsed.
source: &'a strInput name for messages.
Implementations§
Source§impl Normaliser<'_>
impl Normaliser<'_>
Sourcepub fn normalise(
&self,
batch: &RawBatch,
out: &mut NormalisedBatch,
) -> Result<()>
pub fn normalise( &self, batch: &RawBatch, out: &mut NormalisedBatch, ) -> Result<()>
Normalises batch into out (reusing its allocations). Runs on the current rayon pool.
§Errors
The first error in input order: invalid UTF-8 in a header (strict), a NUL byte, an unknown character (strict), or a record whose length differs from the alignment width.
Trait Implementations§
Source§impl<'a> Clone for Normaliser<'a>
impl<'a> Clone for Normaliser<'a>
Source§fn clone(&self) -> Normaliser<'a>
fn clone(&self) -> Normaliser<'a>
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 moreimpl<'a> Copy for Normaliser<'a>
Auto Trait Implementations§
impl<'a> Freeze for Normaliser<'a>
impl<'a> RefUnwindSafe for Normaliser<'a>
impl<'a> Send for Normaliser<'a>
impl<'a> Sync for Normaliser<'a>
impl<'a> Unpin for Normaliser<'a>
impl<'a> UnsafeUnpin for Normaliser<'a>
impl<'a> UnwindSafe for Normaliser<'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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
Converts
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> ⓘ
Converts
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