pub enum CromaError {
EmptyInput,
MissingKey,
NoMusic,
ParseFailed(Vec<Diagnostic>),
}Expand description
Why an ABC conversion failed.
Every failure today is CromaError::ParseFailed, carrying the error
diagnostics; an empty file, a missing K: and a tune without music arrive
there with the codes abc.file.empty, abc.file.missing_k and
abc.file.no_music.
Variants§
EmptyInput
👎Deprecated since 1.4.0:
never constructed; an empty source is ParseFailed with code abc.file.empty
MissingKey
👎Deprecated since 1.4.0:
never constructed; a missing K: is ParseFailed with code abc.file.missing_k
NoMusic
👎Deprecated since 1.4.0:
never constructed; a tune without music is ParseFailed with code abc.file.no_music
ParseFailed(Vec<Diagnostic>)
The source has errors; the diagnostics say which and where.
Implementations§
Source§impl CromaError
impl CromaError
pub fn diagnostics(&self) -> &[Diagnostic]
Trait Implementations§
Source§impl Clone for CromaError
impl Clone for CromaError
Source§impl Debug for CromaError
impl Debug for CromaError
Source§impl Display for CromaError
impl Display for CromaError
impl Eq for CromaError
Source§impl Error for CromaError
impl Error for CromaError
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 PartialEq for CromaError
impl PartialEq for CromaError
impl StructuralPartialEq for CromaError
Auto Trait Implementations§
impl Freeze for CromaError
impl RefUnwindSafe for CromaError
impl Send for CromaError
impl Sync for CromaError
impl Unpin for CromaError
impl UnsafeUnpin for CromaError
impl UnwindSafe for CromaError
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