Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Serialize and Deserialize for Tree #5

Open
Tirzono opened this issue Jan 25, 2021 · 1 comment
Open

Implement Serialize and Deserialize for Tree #5

Tirzono opened this issue Jan 25, 2021 · 1 comment

Comments

@Tirzono
Copy link

Tirzono commented Jan 25, 2021

Would it be possible to implement serde's Serialize and Deserialize for the Tree struct? This would allow me to generate the tree, save it to a file and load it when I need it to speed up things.

@kornelski
Copy link
Owner

Serde would be a bit problematic, because:

  • nodes contain item values. You probably have the values stored elsewhere already.
  • it'd expose internal implementation, and I don't want to promise that tree saved in one version can be read by another.

Maybe there could be a method to import/export Vec<(near, far, idx, radius)>?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants