Skip to content

Document relationship between Deref[Mut], ToOwned, AsRef/AsMut, Borrow[Mut], From, and Into #36435

Closed
@kmcallister

Description

@kmcallister

Rust has a proliferation of conversion traits. The Book has a chapter on "Borrow and AsRef" but it doesn't really clear things up. It would be great to have a document which explains how all the traits inter-relate, and how to pick one for a given use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions