pub trait IntoOwnedDatawhere
Self: Sized,{
type OwnedData;
// Required method
fn into_owned_data(self) -> Self::OwnedData;
// Provided method
fn clone_into(self, target: &mut Self::OwnedData) { ... }
}Expand description
In contrast to IntoOwned, this trait produces a clone with owned data, but
potentially borrowed structure of the collection.
Required Associated Types§
Required Methods§
fn into_owned_data(self) -> Self::OwnedData
Provided Methods§
fn clone_into(self, target: &mut Self::OwnedData)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<S: ToOwned + ?Sized> IntoOwnedData for &S
Blanked implementation of IntoOwnedData for references of types that are
already std::borrow::ToOwned.
impl<S: ToOwned + ?Sized> IntoOwnedData for &S
Blanked implementation of IntoOwnedData for references of types that are
already std::borrow::ToOwned.
Source§impl<S: ToOwned + ?Sized> IntoOwnedData for &mut S
Blanked implementation of IntoOwnedData for mutable references of types that are
already std::borrow::ToOwned.
impl<S: ToOwned + ?Sized> IntoOwnedData for &mut S
Blanked implementation of IntoOwnedData for mutable references of types that are
already std::borrow::ToOwned.
Source§impl<S: IntoOwnedData, T: IntoOwnedData> IntoOwnedData for (S, T)
impl<S: IntoOwnedData, T: IntoOwnedData> IntoOwnedData for (S, T)
type OwnedData = (<S as IntoOwnedData>::OwnedData, <T as IntoOwnedData>::OwnedData)
fn into_owned_data(self) -> Self::OwnedData
Source§impl<T> IntoOwnedData for Vec<T>
Since Vec already owns its data, this is simply a noop.
impl<T> IntoOwnedData for Vec<T>
Since Vec already owns its data, this is simply a noop.