#[repr(C)]pub enum Error {
SectionError(SectionError),
HeaderError(HeaderError),
NotValidExecutable,
ExecutableCorrupted,
VersionIncorrect([u16; 3], [u16; 3]),
UnknownCharacter,
NoSections,
}Expand description
The error type of parsing header.
Variants§
SectionError(SectionError)
Section inner error.
See SectionError for more details.
HeaderError(HeaderError)
Header inner error.
See HeaderError for more details.
NotValidExecutable
The executable is not valid
Will appear if magic is not correct.
ExecutableCorrupted
The section which is corrupted.
Will appear if:
- The buffer size is lower than specified length;
- Append an unexecable and unloadable section within an entry address (
Builderonly).
VersionIncorrect([u16; 3], [u16; 3])
The version that was written in file is incorrect.
Will appear if:
- The max version is lower than the min version;
- Passing a max version which is lower than min version (
Builderonly).
§Arguments
- 0: The min version;
- 1: The max version.
UnknownCharacter
An unknown character in UTF-8 was found in parsing arrays
May appear in converting slice to &str.
NoSections
No sections in the current executable.
Will appear if you try to build without any appending.
Trait Implementations§
impl Copy for Error
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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