Struct elf_utilities::section::ShdrPreparation64[][src]

#[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,
}

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(&section::Flag::Alloc));
assert!(shdr.get_flags().contains(&section::Flag::Write));

Fields

sh_type: Type

Type of section

sh_flags: Elf64Xword

Miscellaneous section attributes

sh_link: Elf64Word

Index of another section

sh_info: Elf64Word

Additional section information

sh_addralign: Elf64Xword

Section alignment

Implementations

impl ShdrPreparation64[src]

pub fn ty(self, t: Type) -> Self[src]

pub fn flags<'a, I>(self, flags: I) -> Self where
    I: Iterator<Item = &'a Flag>, 
[src]

pub fn info(self, info: Elf64Word) -> Self[src]

Trait Implementations

impl Clone for ShdrPreparation64[src]

impl Copy for ShdrPreparation64[src]

impl Default for ShdrPreparation64[src]

impl Eq for ShdrPreparation64[src]

impl Hash for ShdrPreparation64[src]

impl Into<Shdr64> for ShdrPreparation64[src]

impl Ord for ShdrPreparation64[src]

impl PartialEq<ShdrPreparation64> for ShdrPreparation64[src]

impl PartialOrd<ShdrPreparation64> for ShdrPreparation64[src]

impl StructuralEq for ShdrPreparation64[src]

impl StructuralPartialEq for ShdrPreparation64[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.