Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Variant] Support creating Variants with pre-existing Metadata #8152

@alamb

Description

@alamb

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

For example, when "shredding" a variant object, a new variant object is made with fields that are successfully shredded totally removed. The output variant object has the same metadata as the input variant (and can't change) but needs to have different actual fields.

The existing VariantBuilder / MetadataBuilder allows new fields to be added (and thus change the Metadata), so it is not directly applicable

Describe the solution you'd like

A way to build variants with a pre-existing, read only, metadata. If a field is added to the the in progress object that is not present in the original metadata, then an error / panic should be raised.

Describe alternatives you've considered
@scovich has one proposal here (basically make MetadataBuilder a trait):

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAny new improvement worthy of a entry in the changelog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions