pub enum Error {
CantOpenFile {
source: Error,
},
NotLParseFile,
UnknownVersion(u32),
Corrupted(String),
EntryCorrupted(String, usize),
UnknownEntryType(String, usize, u32),
EntryOverflow(u32, usize, usize),
MismatchedVersions(u32, u32),
CannotFindEntry(String),
UnexpectedEntryType(u32, u32),
}Expand description
Error when loading/saving lparse files
Variants§
CantOpenFile
Couldn’t open the file for reading and writing
Fields
§
source: ErrorThe actuall std::io::Error that came from reading and writing
NotLParseFile
The file being opened is not an CNM Lparse file.
UnknownVersion(u32)
The version specifed can not be loaded by the parser
Corrupted(String)
The lparse file is corrupted due to …
EntryCorrupted(String, usize)
Entry ID {1} (name: {0}) is corrupted
UnknownEntryType(String, usize, u32)
Entry ID {1} (name: {0}) has an unknown type id of {2}
EntryOverflow(u32, usize, usize)
The CNM LParse struct has too many entries
MismatchedVersions(u32, u32)
When loading a level file, the 2 files .cnmb and .cnms have mismatching version ids.
CannotFindEntry(String)
When looking for an entry, it couldn’t find it
UnexpectedEntryType(u32, u32)
When getting a entry you expected data type X but got data type Y
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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