Struct gimli::read::FileEntry

source ·
pub struct FileEntry<R, Offset = <R as Reader>::Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,
{ /* private fields */ }
Expand description

An entry in the LineProgramHeader’s file_names set.

Implementations§

source§

impl<R, Offset> FileEntry<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

source

pub fn path_name(&self) -> AttributeValue<R, Offset>

A slice containing the full or relative path name of a source file. If the entry contains a file name or a relative path name, the file is located relative to either the compilation directory (as specified by the DW_AT_comp_dir attribute given in the compilation unit) or one of the directories in the include_directories section.

source

pub fn directory_index(&self) -> u64

An unsigned LEB128 number representing the directory index of the directory in which the file was found.

The directory index represents an entry in the include_directories section of the line number program header. The index is 0 if the file was found in the current directory of the compilation, 1 if it was found in the first directory in the include_directories section, and so on. The directory index is ignored for file names that represent full path names.

source

pub fn directory( &self, header: &LineProgramHeader<R>, ) -> Option<AttributeValue<R, Offset>>

Get this file’s directory.

A directory index of 0 corresponds to the compilation unit directory.

source

pub fn timestamp(&self) -> u64

The implementation-defined time of last modification of the file, or 0 if not available.

source

pub fn size(&self) -> u64

The size of the file in bytes, or 0 if not available.

source

pub fn md5(&self) -> &[u8; 16]

A 16-byte MD5 digest of the file contents.

Only valid if LineProgramHeader::file_has_md5 returns true.

Trait Implementations§

source§

impl<R, Offset> Clone for FileEntry<R, Offset>
where R: Reader<Offset = Offset> + Clone, Offset: ReaderOffset + Clone,

source§

fn clone(&self) -> FileEntry<R, Offset>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R, Offset> Debug for FileEntry<R, Offset>
where R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,

source§

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

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

impl<R, Offset> PartialEq for FileEntry<R, Offset>
where R: Reader<Offset = Offset> + PartialEq, Offset: ReaderOffset + PartialEq,

source§

fn eq(&self, other: &FileEntry<R, Offset>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<R, Offset> Copy for FileEntry<R, Offset>
where R: Reader<Offset = Offset> + Copy, Offset: ReaderOffset + Copy,

source§

impl<R, Offset> Eq for FileEntry<R, Offset>
where R: Reader<Offset = Offset> + Eq, Offset: ReaderOffset + Eq,

source§

impl<R, Offset> StructuralPartialEq for FileEntry<R, Offset>
where R: Reader<Offset = Offset>, Offset: ReaderOffset,

Auto Trait Implementations§

§

impl<R, Offset> Freeze for FileEntry<R, Offset>
where R: Freeze, Offset: Freeze,

§

impl<R, Offset> RefUnwindSafe for FileEntry<R, Offset>
where R: RefUnwindSafe, Offset: RefUnwindSafe,

§

impl<R, Offset> Send for FileEntry<R, Offset>
where R: Send, Offset: Send,

§

impl<R, Offset> Sync for FileEntry<R, Offset>
where R: Sync, Offset: Sync,

§

impl<R, Offset> Unpin for FileEntry<R, Offset>
where R: Unpin, Offset: Unpin,

§

impl<R, Offset> UnwindSafe for FileEntry<R, Offset>
where R: UnwindSafe, Offset: 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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.