pub enum FerroError {
Show 14 variants
Parse {
pos: usize,
msg: String,
diagnostic: Option<Box<Diagnostic>>,
},
ReferenceNotFound {
id: String,
},
ExonIntronBoundary {
exon: u32,
variant: String,
},
UtrCdsBoundary {
variant: String,
},
InvalidCoordinates {
msg: String,
},
UnsupportedVariant {
variant_type: String,
},
IntronicVariant {
variant: String,
},
GenomicReferenceNotAvailable {
contig: String,
start: u64,
end: u64,
},
ProteinReferenceNotAvailable {
accession: String,
start: u64,
end: u64,
},
AminoAcidMismatch {
accession: String,
position: u64,
expected: String,
found: String,
},
ReferenceMismatch {
location: String,
expected: String,
found: String,
},
ConversionError {
msg: String,
},
Io {
msg: String,
},
Json {
msg: String,
},
}Expand description
Main error type for ferro-hgvs operations
Variants§
Parse
Parse error with position and message
Fields
§
diagnostic: Option<Box<Diagnostic>>Optional diagnostic with additional context
ReferenceNotFound
Reference sequence or transcript not found
ExonIntronBoundary
Variant spans an exon-intron boundary
UtrCdsBoundary
Variant spans a UTR-CDS boundary
InvalidCoordinates
Invalid coordinates provided
UnsupportedVariant
Unsupported variant type
IntronicVariant
Intronic variant cannot be normalized (no genomic data)
GenomicReferenceNotAvailable
Genomic reference data is not available
ProteinReferenceNotAvailable
Protein reference data is not available
AminoAcidMismatch
Amino acid mismatch with reference
ReferenceMismatch
Reference sequence mismatch
ConversionError
Coordinate conversion error
Io
IO error (for file operations)
Json
JSON parsing error
Implementations§
Source§impl FerroError
impl FerroError
Sourcepub fn parse_with_diagnostic(
pos: usize,
msg: impl Into<String>,
diagnostic: Diagnostic,
) -> Self
pub fn parse_with_diagnostic( pos: usize, msg: impl Into<String>, diagnostic: Diagnostic, ) -> Self
Create a parse error with diagnostic information
Sourcepub fn parse(pos: usize, msg: impl Into<String>) -> Self
pub fn parse(pos: usize, msg: impl Into<String>) -> Self
Create a simple parse error without diagnostic
Sourcepub fn detailed_message(&self) -> String
pub fn detailed_message(&self) -> String
Get a formatted error with full diagnostic output
Trait Implementations§
Source§impl Clone for FerroError
impl Clone for FerroError
Source§fn clone(&self) -> FerroError
fn clone(&self) -> FerroError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FerroError
impl Debug for FerroError
Source§impl Display for FerroError
impl Display for FerroError
Source§impl Error for FerroError
impl Error for FerroError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ConversionError> for FerroError
impl From<ConversionError> for FerroError
Source§fn from(err: ConversionError) -> Self
fn from(err: ConversionError) -> Self
Converts to this type from the input type.
Source§impl From<Error> for FerroError
impl From<Error> for FerroError
Source§impl From<Error> for FerroError
impl From<Error> for FerroError
Source§impl PartialEq for FerroError
impl PartialEq for FerroError
impl StructuralPartialEq for FerroError
Auto Trait Implementations§
impl Freeze for FerroError
impl RefUnwindSafe for FerroError
impl Send for FerroError
impl Sync for FerroError
impl Unpin for FerroError
impl UnsafeUnpin for FerroError
impl UnwindSafe for FerroError
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,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.