pub struct FunctionCallReplacer<'a> { /* private fields */ }Expand description
Visitor to find and replace function calls
Implementations§
Source§impl<'a> FunctionCallReplacer<'a>
impl<'a> FunctionCallReplacer<'a>
pub fn new( replacements: HashMap<String, ReplaceInfo>, source_module: &'a PythonModule<'a>, type_introspection: TypeIntrospectionMethod, file_path: String, module_name: String, ) -> Self
pub fn get_replacements(self) -> Vec<(Range<usize>, String)>
Source§impl<'a> FunctionCallReplacer<'a>
impl<'a> FunctionCallReplacer<'a>
pub fn visit_expr(&mut self, expr: &'a AstExpr)
pub fn visit_stmt(&mut self, stmt: &'a AstStmt)
Auto Trait Implementations§
impl<'a> Freeze for FunctionCallReplacer<'a>
impl<'a> RefUnwindSafe for FunctionCallReplacer<'a>
impl<'a> Send for FunctionCallReplacer<'a>
impl<'a> Sync for FunctionCallReplacer<'a>
impl<'a> Unpin for FunctionCallReplacer<'a>
impl<'a> UnsafeUnpin for FunctionCallReplacer<'a>
impl<'a> UnwindSafe for FunctionCallReplacer<'a>
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