@n3npq can't say I'm super thrilled with the prospects of replacing access to
an in-memory data structure with something based on XML
>As for handling tag data, you probably don't want to expose rpmtd to rust
>directly but convert to native representation [...]
> Worse, any data addition to a header can make the data retrieved with
> HEADERGET_MINMEM invalid behind your back. HEADERGET_MINMEM should really be
> considered a historical leftover and an rpm internal thing at best, it's not
> something you want to build anything on.
Alright, perhaps I can take a step back from the reference-based stuff and take
a look at creating "owned" values... although my preferred way to do that in
Rust would be for Rust to make a copy itself, as opposed to having rpm allocate
the memory and me having to call rpm again to free it. That way Rust owns the
memory and I can leverage Rust's built-in destructors.
This was my original plan when I was using a `StreamingIterator`: make `Header`
and `rpmtd` access internal to the library only, and expose a real Rust
`Iterator` which makes copies of the data it iterates over when exposing them
to the end user of the library.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/429#issuecomment-382019238
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint