pub trait CstNodeClass {
const CLASS_INDEX: i32;
}Expand description
CST analog of AstNodeClass — the LUAU_CST_RTTI(Class) macro, which
expands to static int CstClassIndex(). CST nodes form a separate RTTI
space (gCstRttiIndex) and a CstNode* is never cross-cast to an AstNode*,
so reusing ast_rtti_index for the index value is sound — uniqueness only
has to hold among CST names ([tests::cst_rtti_indices_unique]).
Required Associated Constants§
Sourceconst CLASS_INDEX: i32
const CLASS_INDEX: i32
The node’s CST RTTI id; mirrors T::CstClassIndex().
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".