#[repr(C)]pub struct ShdrPreparation32 {
pub sh_type: Type,
pub sh_flags: Elf32Word,
pub sh_link: Elf32Word,
pub sh_info: Elf32Word,
pub sh_addralign: Elf32Word,
}
Expand description
A Shdr32
builder
§Examples
use elf_utilities::section;
let shdr: section::Shdr32 = section::ShdrPreparation32::default()
.ty(section::Type::ProgBits)
.flags(vec![section::Flag::Alloc, section::Flag::Write].iter())
.into();
assert_eq!(section::Type::ProgBits, shdr.get_type());
assert!(shdr.get_flags().contains(§ion::Flag::Alloc));
assert!(shdr.get_flags().contains(§ion::Flag::Write));
Fields§
§sh_type: Type
Type of section
sh_flags: Elf32Word
Miscellaneous section attributes
sh_link: Elf32Word
Index of another section
sh_info: Elf32Word
Additional section information
sh_addralign: Elf32Word
Section alignment
Implementations§
Trait Implementations§
Source§impl Clone for ShdrPreparation32
impl Clone for ShdrPreparation32
Source§fn clone(&self) -> ShdrPreparation32
fn clone(&self) -> ShdrPreparation32
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for ShdrPreparation32
impl Default for ShdrPreparation32
Source§impl Hash for ShdrPreparation32
impl Hash for ShdrPreparation32
Source§impl Into<Shdr32> for ShdrPreparation32
impl Into<Shdr32> for ShdrPreparation32
Source§impl Ord for ShdrPreparation32
impl Ord for ShdrPreparation32
Source§fn cmp(&self, other: &ShdrPreparation32) -> Ordering
fn cmp(&self, other: &ShdrPreparation32) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ShdrPreparation32
impl PartialEq for ShdrPreparation32
Source§impl PartialOrd for ShdrPreparation32
impl PartialOrd for ShdrPreparation32
impl Copy for ShdrPreparation32
impl Eq for ShdrPreparation32
impl StructuralPartialEq for ShdrPreparation32
Auto Trait Implementations§
impl Freeze for ShdrPreparation32
impl RefUnwindSafe for ShdrPreparation32
impl Send for ShdrPreparation32
impl Sync for ShdrPreparation32
impl Unpin for ShdrPreparation32
impl UnwindSafe for ShdrPreparation32
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