#[non_exhaustive]pub enum SectionProblem {
NameContainsNul,
BadAlignment,
FlagsDoNotMatchKind,
MergeWithoutEntrySize,
ContentsDoNotMatchKind,
MisalignedAddress,
AddressOverflow,
}Expand description
What is wrong with one section. Reported inside ModelError::Section.
§Examples
use object_lang::SectionProblem;
assert_eq!(SectionProblem::BadAlignment.to_string(), "alignment is not a power of two");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.
NameContainsNul
The name contains a NUL byte, which no format can store.
BadAlignment
The alignment is zero or not a power of two.
FlagsDoNotMatchKind
The flags are not allowed for the section’s kind (see
SectionKind).
MergeWithoutEntrySize
MERGE is set but the entry size is zero.
ContentsDoNotMatchKind
A Bss section has bytes, or another kind has a BSS
size.
MisalignedAddress
The address is not a multiple of the alignment.
AddressOverflow
The address plus the size overflows the 64-bit address space.
Trait Implementations§
Source§impl Clone for SectionProblem
impl Clone for SectionProblem
impl Copy for SectionProblem
Source§impl Debug for SectionProblem
impl Debug for SectionProblem
Source§impl Display for SectionProblem
impl Display for SectionProblem
impl Eq for SectionProblem
Source§impl Hash for SectionProblem
impl Hash for SectionProblem
Source§impl PartialEq for SectionProblem
impl PartialEq for SectionProblem
impl StructuralPartialEq for SectionProblem
Auto Trait Implementations§
impl Freeze for SectionProblem
impl RefUnwindSafe for SectionProblem
impl Send for SectionProblem
impl Sync for SectionProblem
impl Unpin for SectionProblem
impl UnsafeUnpin for SectionProblem
impl UnwindSafe for SectionProblem
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