The new Package is simpler in structure and utilizes type state to ensure the version and arch fields can only be used in the appropriate context.
The registry and namespace fields are no longer owned by Package as they never change and won't outlive the lifetime of the request. This prevents multiple clones, especially in list_package_files.
Rename
Info
toPackage
.The new
Package
is simpler in structure and utilizes type state to ensure theversion
andarch
fields can only be used in the appropriate context.The
registry
andnamespace
fields are no longer owned byPackage
as they never change and won't outlive the lifetime of the request. This prevents multiple clones, especially inlist_package_files
.