Skip to content

Seal traits that only intended to be implemented within the crate that defines them #620

@taiki-e

Description

@taiki-e

Currently, crossbeam provides the following traits:
https://docs.rs/crossbeam/0.8.0/crossbeam/all.html

Some of these seem intended to be implemented for a particular type and not intended to be implemented by the user.
If I understand correctly, the traits below are not intended to be implemented by the user:

I would prefer to seal these traits using the sealed trait pattern described in API guidelines to prevent them from being accidentally implemented by the user. (Even if we never plan to make breaking changes to these APIs, I believe it's still worthwhile to prevent users from accidentally implementing these traits.)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions