pub enum PreparedQuery {
Show 19 variants
Comments,
Strings,
Imports,
DocStrings,
FunctionNames,
FunctionCalls,
Class,
Def,
AsyncDef,
Methods,
ClassMethods,
StaticMethods,
With,
Try,
Lambda,
Globals,
VariableIdentifiers,
Types,
Identifiers,
}Expand description
Prepared tree-sitter queries for Python.
Variants§
Comments
Comments.
Strings
Strings (raw, byte, f-strings; interpolation not included).
Imports
Module names in imports (incl. periods; excl. import/from/as/*).
DocStrings
Docstrings (not including multi-line strings).
FunctionNames
Function names, at the definition site.
FunctionCalls
Function calls.
Class
Class definitions (in their entirety).
Def
Function definitions (all def block in their entirety).
AsyncDef
Async function definitions (all async def block in their entirety).
Methods
Function definitions inside class bodies.
ClassMethods
Function definitions decorated as classmethod (excl. the decorator).
StaticMethods
Function definitions decorated as staticmethod (excl. the decorator).
With
with blocks (in their entirety).
Try
try blocks (in their entirety).
Lambda
lambda statements (in their entirety).
Globals
Global, i.e. module-level variables.
VariableIdentifiers
Identifiers for variables (left-hand side of assignments).
Types
Types in type hints.
Identifiers
Identifiers (variable names, …).
Trait Implementations§
Source§impl Clone for PreparedQuery
impl Clone for PreparedQuery
Source§fn clone(&self) -> PreparedQuery
fn clone(&self) -> PreparedQuery
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PreparedQuery
impl Debug for PreparedQuery
Source§impl From<PreparedQuery> for CompiledQuery
impl From<PreparedQuery> for CompiledQuery
Source§fn from(query: PreparedQuery) -> Self
fn from(query: PreparedQuery) -> Self
Source§impl ValueEnum for PreparedQuery
impl ValueEnum for PreparedQuery
impl Copy for PreparedQuery
Auto Trait Implementations§
impl Freeze for PreparedQuery
impl RefUnwindSafe for PreparedQuery
impl Send for PreparedQuery
impl Sync for PreparedQuery
impl Unpin for PreparedQuery
impl UnwindSafe for PreparedQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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