Struct gimli::write::Sections

source ·
pub struct Sections<W: Writer> {
    pub debug_abbrev: DebugAbbrev<W>,
    pub debug_info: DebugInfo<W>,
    pub debug_line: DebugLine<W>,
    pub debug_line_str: DebugLineStr<W>,
    pub debug_ranges: DebugRanges<W>,
    pub debug_rnglists: DebugRngLists<W>,
    pub debug_loc: DebugLoc<W>,
    pub debug_loclists: DebugLocLists<W>,
    pub debug_str: DebugStr<W>,
    pub debug_frame: DebugFrame<W>,
    pub eh_frame: EhFrame<W>,
    /* private fields */
}
Expand description

All of the writable DWARF sections.

Fields§

§debug_abbrev: DebugAbbrev<W>

The .debug_abbrev section.

§debug_info: DebugInfo<W>

The .debug_info section.

§debug_line: DebugLine<W>

The .debug_line section.

§debug_line_str: DebugLineStr<W>

The .debug_line_str section.

§debug_ranges: DebugRanges<W>

The .debug_ranges section.

§debug_rnglists: DebugRngLists<W>

The .debug_rnglists section.

§debug_loc: DebugLoc<W>

The .debug_loc section.

§debug_loclists: DebugLocLists<W>

The .debug_loclists section.

§debug_str: DebugStr<W>

The .debug_str section.

§debug_frame: DebugFrame<W>

The .debug_frame section.

§eh_frame: EhFrame<W>

The .eh_frame section.

Implementations§

source§

impl<W: Writer + Clone> Sections<W>

source

pub fn new(section: W) -> Self

Create a new Sections using clones of the given section.

source§

impl<W: Writer> Sections<W>

source

pub fn get(&self, id: SectionId) -> Option<&W>

Get the section with the given id.

source

pub fn get_mut(&mut self, id: SectionId) -> Option<&mut W>

Get the section with the given id.

source

pub fn for_each<'a, F, E>(&'a self, f: F) -> Result<(), E>
where F: FnMut(SectionId, &'a W) -> Result<(), E>,

For each section, call f once with a shared reference.

source

pub fn for_each_mut<'a, F, E>(&'a mut self, f: F) -> Result<(), E>
where F: FnMut(SectionId, &'a mut W) -> Result<(), E>,

For each section, call f once with a mutable reference.

Trait Implementations§

source§

impl<W: Debug + Writer> Debug for Sections<W>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<W: Default + Writer> Default for Sections<W>

source§

fn default() -> Sections<W>

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<W> Freeze for Sections<W>
where W: Freeze,

§

impl<W> RefUnwindSafe for Sections<W>
where W: RefUnwindSafe,

§

impl<W> Send for Sections<W>
where W: Send,

§

impl<W> Sync for Sections<W>
where W: Sync,

§

impl<W> Unpin for Sections<W>
where W: Unpin,

§

impl<W> UnwindSafe for Sections<W>
where W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.