Struct elf_utilities::section::ShdrPreparation32[][src]

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

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

impl ShdrPreparation32[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: Elf32Word) -> Self[src]

Trait Implementations

impl Clone for ShdrPreparation32[src]

impl Copy for ShdrPreparation32[src]

impl Default for ShdrPreparation32[src]

impl Eq for ShdrPreparation32[src]

impl Hash for ShdrPreparation32[src]

impl Into<Shdr32> for ShdrPreparation32[src]

impl Ord for ShdrPreparation32[src]

impl PartialEq<ShdrPreparation32> for ShdrPreparation32[src]

impl PartialOrd<ShdrPreparation32> for ShdrPreparation32[src]

impl StructuralEq for ShdrPreparation32[src]

impl StructuralPartialEq for ShdrPreparation32[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.