pub struct CodeInfo<'src> {
pub dir: Option<Cow<'src, Path>>,
pub file: Cow<'src, OsStr>,
pub line: Option<u32>,
pub column: Option<u16>,
/* private fields */
}Expand description
Source code location information for a symbol or inlined function.
Fields§
§dir: Option<Cow<'src, Path>>The directory in which the source file resides.
file: Cow<'src, OsStr>The file that defines the symbol.
line: Option<u32>The line number of the symbolized instruction in the source code.
This is the line number of the instruction of the address being symbolized, not the line number that defines the symbol (function).
column: Option<u16>The column number of the symbolized instruction in the source code.
Implementations§
Source§impl CodeInfo<'_>
impl CodeInfo<'_>
Sourcepub fn to_path(&self) -> Cow<'_, Path>
pub fn to_path(&self) -> Cow<'_, Path>
Helper method to retrieve the path to the represented source file, on a best-effort basis. It depends on the symbolization source data whether this path is absolute or relative and, if its the latter, what directory it is relative to. In general this path is mostly intended for displaying purposes.
Sourcepub fn into_owned(self) -> CodeInfo<'static>
pub fn into_owned(self) -> CodeInfo<'static>
Convert this object into one with all references converted into guaranteed owned (i.e., heap allocated) members.