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,
impl<R, Offset> FileEntry<R, Offset>where
R: Reader<Offset = Offset>,
Offset: ReaderOffset,
sourcepub fn path_name(&self) -> AttributeValue<R, Offset>
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.
sourcepub fn directory_index(&self) -> u64
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.
sourcepub fn directory(
&self,
header: &LineProgramHeader<R>,
) -> Option<AttributeValue<R, Offset>>
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.
sourcepub fn timestamp(&self) -> u64
pub fn timestamp(&self) -> u64
The implementation-defined time of last modification of the file, or 0 if not available.
sourcepub fn md5(&self) -> &[u8; 16]
pub fn md5(&self) -> &[u8; 16]
A 16-byte MD5 digest of the file contents.
Only valid if LineProgramHeader::file_has_md5
returns true
.
sourcepub fn source(&self) -> Option<AttributeValue<R, Offset>>
pub fn source(&self) -> Option<AttributeValue<R, Offset>>
The source code of this file. (UTF-8 source text string with “\n” line endings).
Note: For DWARF v5 files this may return an empty attribute that
indicates that no source code is available, which this function
represents as Some(<zero-length attr>)
.
Trait Implementations§
impl<R, Offset> Copy for FileEntry<R, Offset>
impl<R, Offset> Eq for FileEntry<R, Offset>
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>
impl<R, Offset> RefUnwindSafe for FileEntry<R, Offset>where
R: RefUnwindSafe,
Offset: RefUnwindSafe,
impl<R, Offset> Send for FileEntry<R, Offset>
impl<R, Offset> Sync for FileEntry<R, Offset>
impl<R, Offset> Unpin for FileEntry<R, Offset>
impl<R, Offset> UnwindSafe for FileEntry<R, Offset>where
R: UnwindSafe,
Offset: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.