Skip to content

Tracking issue for IntoCow stabilization #27735

Closed
@aturon

Description

@aturon

NOTE: IntoCow has been deprecated, but you can get the same conversion by using the Cow::Owned constructor, like so: Cow::Owned(vec![1, 2, 3]).

The IntoCow trait is a custom conversion trait for working with Cow; the custom nature is needed to deal with trait coherence issues.

Ultimately, the hope was that this trait could support ergonomic "ownership polymorphism" for things like the entry API. That's not the case today due to coherence limitations, but may become possible with impl specialization or other changes to the trait system.

The API needs a full re-evaluation before stabilization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    B-unstableBlocker: Implemented in the nightly compiler and unstable.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions