pub struct Normalizer<P: ReferenceProvider> { /* private fields */ }Expand description
Main normalizer struct
Implementations§
Source§impl<P: ReferenceProvider> Normalizer<P>
impl<P: ReferenceProvider> Normalizer<P>
Sourcepub fn with_config(provider: P, config: NormalizeConfig) -> Self
pub fn with_config(provider: P, config: NormalizeConfig) -> Self
Create a normalizer with custom configuration
Sourcepub fn config(&self) -> &NormalizeConfig
pub fn config(&self) -> &NormalizeConfig
Get the configuration
Sourcepub fn normalize(
&self,
variant: &HgvsVariant,
) -> Result<HgvsVariant, FerroError>
pub fn normalize( &self, variant: &HgvsVariant, ) -> Result<HgvsVariant, FerroError>
Normalize a variant
In strict mode (default), rejects variants with reference mismatches.
Use normalize_with_warnings for lenient mode that corrects mismatches.
Sourcepub fn normalize_with_warnings(
&self,
variant: &HgvsVariant,
) -> Result<NormalizeResultWithWarnings, FerroError>
pub fn normalize_with_warnings( &self, variant: &HgvsVariant, ) -> Result<NormalizeResultWithWarnings, FerroError>
Normalize a variant with detailed warnings
Returns the normalized variant along with any warnings generated during normalization (e.g., reference sequence mismatches that were auto-corrected). Use this method when you want to track what corrections were made.
Auto Trait Implementations§
impl<P> Freeze for Normalizer<P>where
P: Freeze,
impl<P> RefUnwindSafe for Normalizer<P>where
P: RefUnwindSafe,
impl<P> Send for Normalizer<P>where
P: Send,
impl<P> Sync for Normalizer<P>where
P: Sync,
impl<P> Unpin for Normalizer<P>where
P: Unpin,
impl<P> UnsafeUnpin for Normalizer<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Normalizer<P>where
P: UnwindSafe,
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