pub struct DebugInfoGenerator { /* private fields */ }Expand description
Debug information generator
Implementations§
Source§impl DebugInfoGenerator
impl DebugInfoGenerator
pub fn new( source_file: PathBuf, target_file: PathBuf, debug_level: DebugLevel, ) -> Self
Sourcepub fn add_mapping(
&mut self,
python_line: usize,
python_column: usize,
symbol: Option<String>,
)
pub fn add_mapping( &mut self, python_line: usize, python_column: usize, symbol: Option<String>, )
Add a source mapping
Sourcepub fn add_function_mapping(&mut self, func: &HirFunction, rust_start: usize)
pub fn add_function_mapping(&mut self, func: &HirFunction, rust_start: usize)
Add a function mapping
Sourcepub fn source_map(&self) -> &SourceMap
pub fn source_map(&self) -> &SourceMap
Get the source map
Sourcepub fn generate_function_debug(&self, func: &HirFunction) -> String
pub fn generate_function_debug(&self, func: &HirFunction) -> String
Generate debug annotations for a function
Sourcepub fn generate_debug_print(&self, var_name: &str, var_type: &Type) -> String
pub fn generate_debug_print(&self, var_name: &str, var_type: &Type) -> String
Generate debug print for a variable
Auto Trait Implementations§
impl Freeze for DebugInfoGenerator
impl RefUnwindSafe for DebugInfoGenerator
impl Send for DebugInfoGenerator
impl Sync for DebugInfoGenerator
impl Unpin for DebugInfoGenerator
impl UnwindSafe for DebugInfoGenerator
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more