Trait object::read::ObjectComdat

source ·
pub trait ObjectComdat<'data>: Sealed {
    type SectionIterator: Iterator<Item = SectionIndex>;

    // Required methods
    fn kind(&self) -> ComdatKind;
    fn symbol(&self) -> SymbolIndex;
    fn name_bytes(&self) -> Result<&'data [u8]>;
    fn name(&self) -> Result<&'data str>;
    fn sections(&self) -> Self::SectionIterator;
}
Expand description

A COMDAT section group in an Object.

This trait is part of the unified read API.

Required Associated Types§

source

type SectionIterator: Iterator<Item = SectionIndex>

An iterator for the sections in the section group.

Required Methods§

source

fn kind(&self) -> ComdatKind

Returns the COMDAT selection kind.

source

fn symbol(&self) -> SymbolIndex

Returns the index of the symbol used for the name of COMDAT section group.

source

fn name_bytes(&self) -> Result<&'data [u8]>

Returns the name of the COMDAT section group.

source

fn name(&self) -> Result<&'data str>

Returns the name of the COMDAT section group.

Returns an error if the name is not UTF-8.

source

fn sections(&self) -> Self::SectionIterator

Get the sections in this section group.

Implementors§

source§

impl<'data, 'file, Elf, R> ObjectComdat<'data> for ElfComdat<'data, 'file, Elf, R>
where Elf: FileHeader, R: ReadRef<'data>,

§

type SectionIterator = ElfComdatSectionIterator<'data, 'file, Elf, R>

source§

impl<'data, 'file, Mach, R> ObjectComdat<'data> for MachOComdat<'data, 'file, Mach, R>
where Mach: MachHeader, R: ReadRef<'data>,

§

type SectionIterator = MachOComdatSectionIterator<'data, 'file, Mach, R>

source§

impl<'data, 'file, Pe, R> ObjectComdat<'data> for PeComdat<'data, 'file, Pe, R>
where Pe: ImageNtHeaders, R: ReadRef<'data>,

§

type SectionIterator = PeComdatSectionIterator<'data, 'file, Pe, R>

source§

impl<'data, 'file, R: ReadRef<'data>> ObjectComdat<'data> for Comdat<'data, 'file, R>

source§

impl<'data, 'file, R: ReadRef<'data>, Coff: CoffHeader> ObjectComdat<'data> for CoffComdat<'data, 'file, R, Coff>

§

type SectionIterator = CoffComdatSectionIterator<'data, 'file, R, Coff>

source§

impl<'data, 'file, Xcoff, R> ObjectComdat<'data> for XcoffComdat<'data, 'file, Xcoff, R>
where Xcoff: FileHeader, R: ReadRef<'data>,

§

type SectionIterator = XcoffComdatSectionIterator<'data, 'file, Xcoff, R>