#[non_exhaustive]pub enum FormatErrorKind {
Malformed,
Invalid,
Unsupported,
TooLarge,
NotFound,
External,
}Expand description
What kind of trouble a FormatError is.
Variants (Non-exhaustive)§
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.
Malformed
The document breaks its format’s syntax: XML that is not well-formed, a token or a number that cannot be read, a file that ends early.
Invalid
The document reads, but says something that cannot be: a value out of range, a reference to nothing, two things that contradict.
Unsupported
Something the reader or the writer does not handle, or that the format has no way to say.
TooLarge
Past a limit the crate sets on what it reads, so that a hostile
file cannot exhaust memory or time: elements nested past
MAX_DEPTH, more than MAX_MEASURES measures, more than sixteen
dots.
NotFound
What was asked for is not in the document: a tune’s reference number, a part.
External
A program the crate runs could not be run, or failed: MuseScore.
Trait Implementations§
Source§impl Clone for FormatErrorKind
impl Clone for FormatErrorKind
impl Copy for FormatErrorKind
Source§impl Debug for FormatErrorKind
impl Debug for FormatErrorKind
impl Eq for FormatErrorKind
Source§impl Hash for FormatErrorKind
impl Hash for FormatErrorKind
Source§impl PartialEq for FormatErrorKind
impl PartialEq for FormatErrorKind
impl StructuralPartialEq for FormatErrorKind
Auto Trait Implementations§
impl Forget for FormatErrorKind
impl Freeze for FormatErrorKind
impl RefUnwindSafe for FormatErrorKind
impl Send for FormatErrorKind
impl Sync for FormatErrorKind
impl Unpin for FormatErrorKind
impl UnsafeUnpin for FormatErrorKind
impl UnwindSafe for FormatErrorKind
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more