Skip to content

How to get a node based on NodeId's private index1: NonZeroUsize? #96

@c64zottel

Description

@c64zottel

I need an unique identifier associated with the nodes and it has to be an integer of any kind <= i/u64.

So I thought I take out the index would be a good idea:
let node_id = arena.get_node_id(node).unwrap(); let uid: usize = node_id.into();

How to put it back in again? How construct a NodeId so that I can get my Node out of the Arena again?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions