PreparedQuery

Enum PreparedQuery 

Source
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

Source§

fn clone(&self) -> PreparedQuery

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PreparedQuery

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<PreparedQuery> for CompiledQuery

Source§

fn from(query: PreparedQuery) -> Self

Converts to this type from the input type.
Source§

impl ValueEnum for PreparedQuery

Source§

fn value_variants<'a>() -> &'a [Self]

All possible argument values, in display order.
Source§

fn to_possible_value<'a>(&self) -> Option<PossibleValue>

The canonical argument value. Read more
Source§

fn from_str(input: &str, ignore_case: bool) -> Result<Self, String>

Parse an argument into Self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.