pub enum ErrorKind {
Invalid(&'static str),
Malformed(&'static str),
}
Expand description
The type of error that occurred while parsing.
As a library consumer, detailed errors about what specific part of the MIDI spec was
violated are not very useful.
For this reason, errors are broadly categorized into 2 classes, and specific error info is
provided as a non-normative string literal.
Fatal errors while reading the file. It is likely that the file is not a MIDI file or
is severely corrupted.
This error cannot be ignored, as there is not enough data to continue parsing.
No information about the file could be rescued.
Non-fatal error, but the file is clearly corrupted.
This kind of error is not emitted by default, only if the strict
crate feature is
enabled.
Ignoring these errors (if the strict
feature is disabled) can cause whole tracks to be
dropped.
Get the informative message on what exact part of the MIDI format was not respected.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer.
Read more
Mutably dereferences the given pointer.
Read more
Drops the object pointed to by the given pointer.
Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
Converts the given value to a
String
.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.