Skip to content

Tracking Issue for {Option,Result}::owned #102696

Closed
@WaffleLapkin

Description

@WaffleLapkin

Feature gates: #![feature(option_owned)], #![feature(result_owned)]

This is a tracking issue for owned method on Option and Result.

Public API

// alloc::option
impl<T: ?Sized> Option<&T> {
    pub fn owned(self) -> Option<T::Owned>
    where
        T: ToOwned;
}

impl<T: ?Sized> Option<&mut T> {
    pub fn owned(self) -> Option<T::Owned>
    where
        T: ToOwned;
}

// alloc::result
impl<T: ?Sized, E> Result<&T, E> {
    pub fn owned(self) -> Result<T::Owned, E>
    where
        T: ToOwned;
}

impl<T: ?Sized, E> Result<&mut T, E> {
    pub fn owned(self) -> Result<T::Owned, E>
    where
        T: ToOwned;
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions