pub struct LineInfo { /* private fields */ }Expand description
Information about a source line mapped from an address.
LineInfo contains the instruction address, the source file path, and
the 1-based line number. It provides helpers for retrieving the line’s
text and formatting it for display.
Implementations§
Source§impl LineInfo
impl LineInfo
Sourcepub fn new(addr: u64, path: PathBuf, line: u64) -> Result<Self>
pub fn new(addr: u64, path: PathBuf, line: u64) -> Result<Self>
Create a new LineInfo from an address, path and 1-based line number.
§Arguments
addr- The instruction address associated with the source line.path- The path to the source file.line- The 1-based line number in the file.
§Errors
Returns an error if the provided line cannot be converted to a
usize.
§Returns
Returns Ok(LineInfo) on success with the provided address, path,
and converted line number. Returns Err if the line argument
cannot be converted to usize.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineInfo
impl RefUnwindSafe for LineInfo
impl Send for LineInfo
impl Sync for LineInfo
impl Unpin for LineInfo
impl UnsafeUnpin for LineInfo
impl UnwindSafe for LineInfo
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
Mutably borrows from an owned value. Read more