fn section_0<'data>(
        &self,
        endian: Self::Endian,
        data: Bytes<'data>,
    ) -> read::Result<Option<&'data Self::SectionHeader>> {
        let shoff: u64 = self.e_shoff(endian).into();
        if shoff == 0 {
            // No section headers is ok.
            return Ok(None);
        }
        let shentsize = self.e_shentsize(endian) as usize;
        if shentsize != mem::size_of::<Self::SectionHeader>() {
            // Section header size must match.
            return Err(Error("Invalid ELF section header entry size"));
        }
        data.read_at(shoff as usize)
            .map(Some)
            .read_error("Invalid ELF section header offset or size")
    }
/// Return the first section header, if present.
///
/// Section 0 is a special case because getting the section headers normally
/// requires `shnum`, but `shnum` may be in the first section header.
Return the first section header, if present.
Section 0 is a special case because getting the section headers normally
requires `shnum`, but `shnum` may be in the first section header.
Return the first section header if present . Section 0 is a special case because getting the section headers normally requires ` shnum ` but ` shnum ` may be in the first section header .
fn section_0<'data>(
        &self,
        endian: Self::Endian,
        data: Bytes<'data>,
    ) -> read::Result<Option<&'data Self::SectionHeader>> {
        let shoff: u64 = self.e_shoff(endian).into();
        if shoff == 0 {
            // No section headers is ok.
            return Ok(None);
        }
        let shentsize = self.e_shentsize(endian) as usize;
        if shentsize != mem::size_of::<Self::SectionHeader>() {
            // Section header size must match.
            return Err(Error("Invalid ELF section header entry size"));
        }
        data.read_at(shoff as usize)
            .map(Some)
            .read_error("Invalid ELF section header offset or size")
    }
fn section_0 < ' data > ( & self , endian : Self :: Endian , data : Bytes < ' data > , ) -> read :: Result < Option < & ' data Self :: SectionHeader > > { let shoff : u64 = self . e_shoff ( endian ) . into ( ) ; if shoff == 0 { // No section headers is ok. return Ok ( None ) ; } let shentsize = self . e_shentsize ( endian ) as usize ; if shentsize != mem :: size_of :: < Self :: SectionHeader > ( ) { // Section header size must match. return Err ( Error ( " " ) ) ; } data . read_at ( shoff as usize ) . map ( Some ) . read_error ( " " ) }
Return the first section header, if present.
Return the first section header if present .
&self
endian
Self::Endian
data
Bytes<'data>
&self
endian
Self::Endian
data
Bytes<'data>