#[repr(C)]pub struct ShdrPreparation64 {
pub sh_type: Type,
pub sh_flags: Elf64Xword,
pub sh_link: Elf64Word,
pub sh_info: Elf64Word,
pub sh_addralign: Elf64Xword,
}Expand description
A Shdr64 builder
§Examples
use elf_utilities::section;
let shdr: section::Shdr64 = section::ShdrPreparation64::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: TypeType of section
sh_flags: Elf64XwordMiscellaneous section attributes
sh_link: Elf64WordIndex of another section
sh_info: Elf64WordAdditional section information
sh_addralign: Elf64XwordSection alignment
Implementations§
Trait Implementations§
Source§impl Clone for ShdrPreparation64
impl Clone for ShdrPreparation64
Source§fn clone(&self) -> ShdrPreparation64
fn clone(&self) -> ShdrPreparation64
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 ShdrPreparation64
impl Default for ShdrPreparation64
Source§impl Hash for ShdrPreparation64
impl Hash for ShdrPreparation64
Source§impl Into<Shdr64> for ShdrPreparation64
impl Into<Shdr64> for ShdrPreparation64
Source§impl Ord for ShdrPreparation64
impl Ord for ShdrPreparation64
Source§fn cmp(&self, other: &ShdrPreparation64) -> Ordering
fn cmp(&self, other: &ShdrPreparation64) -> 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 ShdrPreparation64
impl PartialEq for ShdrPreparation64
Source§impl PartialOrd for ShdrPreparation64
impl PartialOrd for ShdrPreparation64
impl Copy for ShdrPreparation64
impl Eq for ShdrPreparation64
impl StructuralPartialEq for ShdrPreparation64
Auto Trait Implementations§
impl Freeze for ShdrPreparation64
impl RefUnwindSafe for ShdrPreparation64
impl Send for ShdrPreparation64
impl Sync for ShdrPreparation64
impl Unpin for ShdrPreparation64
impl UnwindSafe for ShdrPreparation64
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