pub struct LibraryTypeDetector { /* private fields */ }Expand description
Accumulates observed library formats and infers the most likely type.
Implementations§
Source§impl LibraryTypeDetector
impl LibraryTypeDetector
pub fn new(read_type: ReadType) -> Self
pub fn is_active(&self) -> bool
Sourcepub fn add_sample(&self, f: LibraryFormat)
pub fn add_sample(&self, f: LibraryFormat)
Record one confidently mapped fragment’s observed format. Only formats matching the detector’s read type are counted, and only until the sample budget is exhausted. Thread-safe.
Sourcepub fn resolved_format(&self) -> Option<LibraryFormat>
pub fn resolved_format(&self) -> Option<LibraryFormat>
Mid-run resolution (salmon’s prefix-detect-then-apply): once enough
samples have been collected ([can_guess]), infer and lock in the
library format (one writer wins the CAS), stop sampling, and return it;
idempotent thereafter. Returns None while still sampling. The caller
applies the returned format as a strand-compatibility filter for the rest
of the run.
Sourcepub fn final_format(&self) -> LibraryFormat
pub fn final_format(&self) -> LibraryFormat
The final library format to report at end of run: the locked-in format if resolution happened mid-run, else inferred from whatever samples were collected (recorded so repeat calls agree). Always returns a format.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LibraryTypeDetector
impl RefUnwindSafe for LibraryTypeDetector
impl Send for LibraryTypeDetector
impl Sync for LibraryTypeDetector
impl Unpin for LibraryTypeDetector
impl UnsafeUnpin for LibraryTypeDetector
impl UnwindSafe for LibraryTypeDetector
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.