Skip to content

Consider removing MultihashDigest and Hasher traits #285

@thomaseizinger

Description

@thomaseizinger

Fundamentally, traits are meant for abstractions. If we don't create abstractions, the traits are not needed. As part of working on #272, it became apparent that the MultihashDigest and Hasher trait are never used for abstractions, only to enforce an interface.

We could change the multihash-derive crate from a custom derive to a proc-macro that just creates an impl block for us, based on API conventions of the various hashers.

If we want to stick to the traits, it would make more sense to develop a generic Codetable component that abstracts over the Hasher trait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions