Skip to content

Trait requirements for RefCountFamily #1

Description

@Eh2406

Rc and Arc have a number of methods in common, which of them should be required for RefCountFamily?
Obviously this is a judgment call. The fewer methods we require, the more implementations can implement the trait. The current requires of Deref<Target = T> + Clone and new, are so broad that we could even implement it for Box. The more methods we require, the more complicated implementations can be generic. I am personally very fond of make_mut, but different people will disagree about which ones are critical.

As a pre-RFC research project, this question could probably be generalized to "for all methods implemented by Rc and Arc which ones can't be added to the trait and why?"
I would also be interested whether there some way to split up the methods that involve Weak into a substrait. So that WeekCountFamily requires RefCountFamily and adds the functionality for Weak pointers.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions