#[non_exhaustive]pub enum GpError {
UnexpectedEof {
offset: usize,
needed: usize,
},
InvalidValue {
context: &'static str,
value: i64,
},
StringDecode {
offset: usize,
},
FormatError(String),
Io(Error),
TypeConversion {
context: &'static str,
value: i64,
},
MissingState {
field: &'static str,
},
WriteError(String),
}Expand description
Error type for Guitar Pro file parsing
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.
UnexpectedEof
Reached end of binary data unexpectedly
InvalidValue
Invalid enum/flag value encountered during parsing
StringDecode
String decoding failure
FormatError(String)
ZIP, XML, or format-level errors from GP6/GP7 parsing
Io(Error)
IO errors
TypeConversion
Type conversion failed (value out of range for target type)
MissingState
Required state not set (e.g., current_track not initialized)
WriteError(String)
Write operation error
Trait Implementations§
Source§impl Error for GpError
impl Error for GpError
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()
Auto Trait Implementations§
impl Freeze for GpError
impl !RefUnwindSafe for GpError
impl Send for GpError
impl Sync for GpError
impl Unpin for GpError
impl UnsafeUnpin for GpError
impl !UnwindSafe for GpError
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