pub struct DebugInfo {
pub source: String,
/* private fields */
}Expand description
Debug information for a Koto program
Fields§
§source: StringThe source of the program that the debug info was derived from
Implementations§
Source§impl DebugInfo
impl DebugInfo
Sourcepub fn push(&mut self, ip: u32, span: Span)
pub fn push(&mut self, ip: u32, span: Span)
Adds a span to the source map for a given ip
Instructions with matching spans share the same entry, so if the span matches the previously pushed span then this is a no-op.
Sourcepub fn get_source_span(&self, ip: u32) -> Option<Span>
pub fn get_source_span(&self, ip: u32) -> Option<Span>
Returns a source span for a given instruction pointer
Trait Implementations§
impl Eq for DebugInfo
impl StructuralPartialEq for DebugInfo
Auto Trait Implementations§
impl Freeze for DebugInfo
impl RefUnwindSafe for DebugInfo
impl Send for DebugInfo
impl Sync for DebugInfo
impl Unpin for DebugInfo
impl UnwindSafe for DebugInfo
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