IntoOwning

Trait IntoOwning 

Source
pub trait IntoOwning: ToOwning + Sized {
    // Required method
    fn into_owning(self) -> Self::Owning;
}
Expand description

A trait for types that can be converted into ones which own their contents.

IntoOwning has a blanket implementation for T where T : Clone, wherein into_owning is the identity function. User-defined types which implement IntoOwning but not Clone typically should do so by calling into_owning() on all their fields.

Required Methods§

Source

fn into_owning(self) -> Self::Owning

Converts an object which owns its contents into one which borrows them.

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.

Implementors§

Source§

impl<'b, B> IntoOwning for Borrowed<'b, B>
where B: ToOwning + ?Sized,

Source§

impl<B> IntoOwning for Owned<B>
where B: ToOwning + ?Sized, B::Owning: Borrow<B>,

Source§

impl<B> IntoOwning for B
where B: Clone,

Source§

impl<T> IntoOwning for ChangeOrKeep<T>
where T: IntoOwning, T::Owning: ToOwning<Owning = T::Owning>,

Source§

impl<T> IntoOwning for Change<T>
where T: IntoOwning,