intoRaw method

Moves this tree into a single-consumption raw handle.

The moved-from Dart object is invalidated, matching Rust's consumed self; reconstructing the handle yields an independently owned tree.

Implementation

TreeSitterRawHandle<TreeSitterTree> intoRaw() {
  final moved = copy();
  dispose();
  return TreeSitterRawHandle<TreeSitterTree>.owned(moved);
}