CodeQL library for Rust
codeql/rust-all 0.2.12 (changelog, source)
Search

Class Raw::ClosureExpr

INTERNAL: Do not use. A closure expression. For example:

|x| x + 1;
move |x: i32| -> i32 { x + 1 };
async |x: i32, y| x + y;
#[coroutine]
|x| yield x;
#[coroutine]
static |x| yield x;
for<T: std::fmt::Debug> |x: T| {
    println!("{:?}", x);
};

Import path

import codeql.rust.elements.internal.generated.Raw

Direct supertypes

Indirect supertypes

Predicates

getClosureBody

Gets the closure body of this closure expression, if it exists.

getForBinder

Gets the for binder of this closure expression, if it exists.

getRetType

Gets the ret type of this closure expression, if it exists.

isAsync

Holds if this closure expression is async.

isConst

Holds if this closure expression is const.

isGen

Holds if this closure expression is gen.

isMove

Holds if this closure expression is move.

isStatic

Holds if this closure expression is static.

toString

Inherited predicates

getAttr

Gets the indexth attr of this callable (0-based).

from Callable
getNumberOfAttrs

Gets the number of attrs of this callable.

from Callable
getParamList

Gets the parameter list of this callable, if it exists.

from Callable