Skip to main content

QueryPattern

Enum QueryPattern 

Source
pub enum QueryPattern {
Show 18 variants Wildcard, For { no_take: bool, }, While { unbounded: bool, }, Call { name: Option<String>, }, Effect { class: Option<EffectClass>, }, Hook { path: Option<String>, }, Function { effect: Option<EffectClass>, }, Require { id: Option<String>, }, Import { path: Option<String>, }, Return, Yield, Transaction, Literal { kind: Option<String>, }, Binary { op: Option<BinOp>, }, Triple, Reified, Match, If,
}
Expand description

An S-expression query pattern that matches against AST nodes.

Variants§

§

Wildcard

Match any node.

§

For

Match a for-loop. no_take matches for-loops without a take: limit.

Fields

§no_take: bool
§

While

Match a while-loop. unbounded matches while-loops without a budget.

Fields

§unbounded: bool
§

Call

Match a function call. name matches calls to a specific function.

Fields

§

Effect

Match an effect statement. class matches a specific effect class.

Fields

§

Hook

Match a hook. path matches hooks with a specific path.

Fields

§

Function

Match a function declaration. effect matches functions with a specific effect class.

Fields

§

Require

Match a capability require. id matches requires for a specific capability.

Fields

§

Import

Match an import. path matches imports of a specific path.

Fields

§

Return

Match a return statement.

§

Yield

Match a yield statement.

§

Transaction

Match a transaction statement.

§

Literal

Match a literal of a specific type.

Fields

§

Binary

Match a binary expression with a specific operator.

Fields

§

Triple

Match a triple expression.

§

Reified

Match a reified expression.

§

Match

Match a match statement.

§

If

Match an if statement.

Trait Implementations§

Source§

impl Clone for QueryPattern

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for QueryPattern

Source§

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

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

impl PartialEq for QueryPattern

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for QueryPattern

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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 = !

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

fn try_from(value: U) -> Result<T, !>

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

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,