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
Feature gates:
#![feature(option_owned)],#![feature(result_owned)]This is a tracking issue for
ownedmethod onOptionandResult.Public API
Steps / History
Option::owned#98061Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩