#[non_exhaustive]pub enum ResourceIndexError {
UnknownVersion {
version: String,
},
Truncated {
what: &'static str,
offset: usize,
needed: usize,
available: usize,
},
OutOfBounds {
what: &'static str,
offset: u32,
len: usize,
},
BadTag {
expected: &'static str,
offset: usize,
found: [u8; 4],
},
IdMismatch {
listed: u32,
found: u32,
offset: usize,
},
UnknownQualifiers {
id: u32,
config: u32,
},
TooManyValues {
limit: usize,
},
}Expand description
Why a resources.index could not be read. Offsets are file offsets.
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.
UnknownVersion
The file does not open with a tool name this crate knows the layout of.
Truncated
OutOfBounds
BadTag
IdMismatch
A table row and the block it points at name different resources.
UnknownQualifiers
A value names a qualifier set the header does not define.
TooManyValues
Tables that share or repeat blocks describe more values than a well-formed index of this size can.
Trait Implementations§
Source§impl Clone for ResourceIndexError
impl Clone for ResourceIndexError
Source§impl Debug for ResourceIndexError
impl Debug for ResourceIndexError
Source§impl Display for ResourceIndexError
impl Display for ResourceIndexError
impl Eq for ResourceIndexError
Source§impl Error for ResourceIndexError
impl Error for ResourceIndexError
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 ResourceIndexError
impl PartialEq for ResourceIndexError
impl StructuralPartialEq for ResourceIndexError
Auto Trait Implementations§
impl Forget for ResourceIndexError
impl Freeze for ResourceIndexError
impl Move for ResourceIndexError
impl RefUnwindSafe for ResourceIndexError
impl Send for ResourceIndexError
impl Sync for ResourceIndexError
impl Unpin for ResourceIndexError
impl UnsafeUnpin for ResourceIndexError
impl UnwindSafe for ResourceIndexError
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