tvl-depot/tvix/tools/narinfo2parquet
Florian Klink a259613c76 feat(nix-compat/narinfo/signature): generalize name field
Requiring `name` to be a `&str` means it'll get annoying to pass around
`Signature`, but being able to pass them around in an owned fashion is
kinda a requirement for a stronger typed `PathInfo` struct, where we
want to have full ownership.

Rework the `Signature` struct to become generic over the type of the
`name` field. This means, it becomes possible to have owned versions
of it.

We don't want to impose `String` or `SmolStr` for example, but want to
leave it up to the nix-compat user to decide.

Provide a type alias for the existing `&str` variant (`SignatureRef`),
and use it where we previously used the non-generic `Signature` one.

Add some tests to ensure it's possible to *use* `Signature` with both
`String` and `SmolStr` (but only pull in `smol_str` as dev dependency
for the tests).

Also, add some more docstrings, these were a bit sparse.

Change-Id: I3f75691498c6bda9cd072d2d9dac83c4f6c57287
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12253
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2024-08-19 19:46:34 +00:00
..
src feat(nix-compat/narinfo/signature): generalize name field 2024-08-19 19:46:34 +00:00
Cargo.lock chore(tvix/tools/narinfo2parquet): bump curve25519-dalek 2024-08-16 06:52:15 +00:00
Cargo.nix chore(tvix/tools/narinfo2parquet): bump curve25519-dalek 2024-08-16 06:52:15 +00:00
Cargo.toml chore(tvix/tools/narinfo2parquet): polars 0.34.2 -> 0.36.2 2024-02-19 16:03:14 +00:00
default.nix chore(tvix/tools/narinfo2parquet): Regenerate Cargo.nix and filter src 2024-07-09 16:47:56 +00:00
OWNERS feat(tvix/tools/narinfo2parquet): init 2023-11-10 19:35:04 +00:00