Skip to main content

cst_node_as

Function cst_node_as 

Source
pub unsafe fn cst_node_as<T>(node: *mut CstNode) -> *mut T
where T: CstNodeClass,
Expand description

cstNode->as<T>() โ€” downcast a base *mut CstNode to *mut T, or null on mismatch.

ยงSafety

node must be null or point to a live CST node whose first field is (transitively) a CstNode โ€” i.e. any generated #[repr(C)] CST node struct.