Skip to content

Replace fixed and variable length interfaces with usage of a traitΒ #86

@TomAFrench

Description

@TomAFrench

We currently have a good deal of duplication on the library boundary to allow for users to use fixed length arrays and boundedvecs for their keys. In #84 I replaced replaced the fixed-length implementations to just delegate to the variable length methods, however this still leaves us with a larger than necessary interface.

As we only use these keys to calculate the keyhash from them, we could make these methods generic over a KeyHashable (name just for example) trait which defines how to calculate the keyhash from a type. We could then implement this for a few types, e.g. array, boundedvec, string. to get more flexibility but without a huge explosion of methods on the interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    πŸ‘€ To Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions