RBTree: How to get parent node based on current cursor?
JunichiSugiura opened this issue · comments
Junichi Sugiura commented
I'm looking for a way to bubble up cache changes in node to its ancestors all the way to the root in RBTree
.
I see there's .parent()
method in rbtree::AtomicLinkOps
but I'm not sure how to access it from Cursor
.
Amanieu d'Antras commented
The parent node isn't really exposed in the RBTree
interface because the RBTree
API exposes the data structure as a linear sequence of ordered values. The internal tree structure is hidden.
What exactly are you trying to achieve with this?
Junichi Sugiura commented
Hi, @Amanieu. Thanks for the response.
I'm trying to re-implement VSCode's buffer implementation in Rust. It requires some low-level tree manipulation logic it seems.
- vscode source code
- This is still WIP but my attempt with the fork is here