IntoOwned

Trait IntoOwned 

Source
pub trait IntoOwned
where Self: Sized,
{ type Owned; // Required method fn into_owned(self) -> Self::Owned; // Provided method fn clone_into(self, target: &mut Self::Owned) { ... } }
Expand description

An analog to the ToOwned trait from std that works for chunked views. As the name suggests, this version of ToOwned takes self by value.

Required Associated Types§

Required Methods§

Source

fn into_owned(self) -> Self::Owned

Provided Methods§

Source

fn clone_into(self, target: &mut Self::Owned)

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> IntoOwned for &S

Blanket implementation of IntoOwned for references of types that are already std::borrow::ToOwned.

Source§

type Owned = <S as ToOwned>::Owned

Source§

fn into_owned(self) -> Self::Owned

Source§

impl<S: ToOwned + ?Sized> IntoOwned for &mut S

Blanket implementation of IntoOwned for mutable references of types that are already std::borrow::ToOwned.

Source§

type Owned = <S as ToOwned>::Owned

Source§

fn into_owned(self) -> Self::Owned

Source§

impl<S: IntoOwned, T: IntoOwned> IntoOwned for (S, T)

Source§

type Owned = (<S as IntoOwned>::Owned, <T as IntoOwned>::Owned)

Source§

fn into_owned(self) -> Self::Owned

Source§

impl<T> IntoOwned for Vec<T>

Since Vec already owns its data, this is simply a noop.

Source§

type Owned = Vec<T>

Source§

fn into_owned(self) -> Self::Owned

Source§

impl<T> IntoOwned for Range<T>

Source§

type Owned = Range<T>

Source§

fn into_owned(self) -> Self::Owned

Source§

impl<T> IntoOwned for RangeTo<T>

Source§

type Owned = RangeTo<T>

Source§

fn into_owned(self) -> Self::Owned

Implementors§