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

Alternative owned data version? #375

Open
mlgiraud opened this issue Aug 11, 2023 · 0 comments
Open

Alternative owned data version? #375

mlgiraud opened this issue Aug 11, 2023 · 0 comments

Comments

@mlgiraud
Copy link

Hi, are there any plans on providing an alternative API where the data is not Borrowed by the goblin objects? The current api is problematic, when i want to for example save an Elf object that was parsed from some data in a struct. This then requires the custom struct to pass through the lifetime annotation, and also the data from which the elf object was parsed needs to be immutably borrowed for as long as this overarching struct lives. I would find it very useful to have an API where there is no lifetime annotation and instead the goblin objects simply take ownership of the data buffer.
Any thoughts on this? Or am i overlooking some easy solution to this problem?

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

1 participant