Enum ErrorType Copy item path Source #[non_exhaustive]
pub enum ErrorType {
Show 15 variants Io,
End,
Str,
Tag,
VlqTooBig,
VlqDecode,
ReadExpect,
FileOpen,
FileCreate,
InvalidFile,
RunningStatus,
StringTooLong,
TooManyTracks,
TrackTooLong,
Other,
}Expand description Identifies what went wrong. The human-readable detail is in the Error ’s Display output.
This enum is marked as non-exhaustive Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
An underlying reader or writer failed.
The data ended while more bytes were expected.
Bytes that should have been a string were not valid UTF-8.
A four-character chunk tag, such as MThd, was not the expected one.
A variable-length quantity ran past its four-byte maximum.
A variable-length quantity could not be decoded.
A byte did not have the one value the spec allows at that position.
A file could not be opened for reading.
A file could not be created for writing.
The bytes are not a well-formed MIDI file.
A message relied on running status, but no status byte had been seen yet.
A string’s length overflows the u32 its length field is stored in.
The track count overflows the u16 the header stores it in.
A track’s length overflows the u32 its length field is stored in.
Something went wrong that has no more specific classification.
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 Compares and returns the maximum of two values.
Read more Compares and returns the minimum of two values.
Read more Restrict a value to a certain interval.
Read more This method returns an ordering between
self and
other values if one exists.
Read more Tests less than (for
self and
other) and is used by the
< operator.
Read more Tests less than or equal to (for
self and
other) and is used by the
<= operator.
Read more Tests greater than (for
self and
other) and is used by the
>
operator.
Read more Tests greater than or equal to (for
self and
other) and is used by
the
>= operator.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
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 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.