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

Class Raw::Const

INTERNAL: Do not use. A constant item declaration.

For example:

const X: i32 = 42;

Import path

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

Direct supertypes

Indirect supertypes

Predicates

getAttr

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

getBody

Gets the body of this const, if it exists.

getGenericParamList

Gets the generic parameter list of this const, if it exists.

getName

Gets the name of this const, if it exists.

getNumberOfAttrs

Gets the number of attrs of this const.

getTypeRepr

Gets the type representation of this const, if it exists.

getVisibility

Gets the visibility of this const, if it exists.

getWhereClause

Gets the where clause of this const, if it exists.

hasImplementation

Holds if this constant has an implementation.

isConst

Holds if this const is const.

isDefault

Holds if this const is default.

toString

Inherited predicates

getAttributeMacroExpansion

Gets the attribute macro expansion of this item, if it exists.

from Item