pub enum PreparedQuery {
Show 46 variants
Comments,
DocComments,
Uses,
Strings,
Attribute,
Struct,
StructNamed(TreeSitterRegex),
PrivStruct,
PubStruct,
PubCrateStruct,
PubSelfStruct,
PubSuperStruct,
Enum,
EnumNamed(TreeSitterRegex),
PrivEnum,
PubEnum,
PubCrateEnum,
PubSelfEnum,
PubSuperEnum,
EnumVariant,
Fn,
FnNamed(TreeSitterRegex),
ImplFn,
PrivFn,
PubFn,
PubCrateFn,
PubSelfFn,
PubSuperFn,
ConstFn,
AsyncFn,
UnsafeFn,
ExternFn,
TestFn,
Trait,
TraitNamed(TreeSitterRegex),
Impl,
ImplType,
ImplTrait,
Mod,
ModNamed(TreeSitterRegex),
ModTests,
TypeDef,
Identifier,
TypeIdentifier,
Closure,
Unsafe,
}Expand description
Prepared tree-sitter queries for Rust.
Variants§
Comments
Comments (line and block styles; excluding doc comments; comment chars incl.).
DocComments
Doc comments (comment chars included).
Uses
Use statements (paths only; excl. use/as/*).
Strings
Strings (regular, raw, byte; includes interpolation parts in format strings!).
There is currently no support for an ‘interpolation’ type node in tree-sitter-rust (like there is in TypeScript and Python, for example).
Attribute
Attributes like #[attr].
Struct
struct definitions.
StructNamed(TreeSitterRegex)
struct definitions, where the struct name matches the provided pattern.
PrivStruct
struct definitions not marked pub.
PubStruct
struct definitions marked pub.
PubCrateStruct
struct definitions marked pub(crate).
PubSelfStruct
struct definitions marked pub(self).
PubSuperStruct
struct definitions marked pub(super).
Enum
enum definitions.
EnumNamed(TreeSitterRegex)
enum definitions, where the enum name matches the provided pattern.
PrivEnum
enum definitions not marked pub.
PubEnum
enum definitions marked pub.
PubCrateEnum
enum definitions marked pub(crate).
PubSelfEnum
enum definitions marked pub(self).
PubSuperEnum
enum definitions marked pub(super).
EnumVariant
Variant members of enum definitions
Fn
Function definitions.
FnNamed(TreeSitterRegex)
Function definitions, where the function name matches the provided pattern.
ImplFn
Function definitions inside impl blocks (associated functions/methods).
PrivFn
Function definitions not marked pub.
PubFn
Function definitions marked pub.
PubCrateFn
Function definitions marked pub(crate).
PubSelfFn
Function definitions marked pub(self).
PubSuperFn
Function definitions marked pub(super).
ConstFn
Function definitions marked const
AsyncFn
Function definitions marked async
UnsafeFn
Function definitions marked unsafe
ExternFn
Function definitions marked extern
TestFn
Function definitions with attributes containing test (#[test], #[rstest],
…).
Trait
trait definitions.
TraitNamed(TreeSitterRegex)
trait definitions, where the trait name matches the provided pattern.
Impl
impl blocks.
ImplType
impl blocks for types (impl SomeType {}).
ImplTrait
impl blocks for traits on types (impl SomeTrait for SomeType {}).
Mod
mod blocks.
ModNamed(TreeSitterRegex)
mod blocks, where the module name matches the provided pattern.
ModTests
mod tests blocks.
TypeDef
Type definitions (struct, enum, union).
Identifier
Identifiers.
TypeIdentifier
Identifiers for types.
Closure
Closure definitions.
Unsafe
unsafe keyword usages (unsafe fn, unsafe blocks, unsafe Trait, unsafe impl Trait).
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
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